forked from craiglpeters/codespaces-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevcontainer.json
More file actions
39 lines (33 loc) · 1.13 KB
/
devcontainer.json
File metadata and controls
39 lines (33 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
// See the devcontainer spec at https://containers.dev/implementors/spec/
"name": "React Codespaces Template",
// Container image to build environment from
// universal contains many tools making it useful in many contexts https://github.com/devcontainers/images/tree/main/src/universal
"image": "mcr.microsoft.com/devcontainers/universal:2",
// Specify the minimum machine spec for running the dev container
"hostRequirements": {
"cpus": 4
},
// Upon codespaces or image prebuild, refresh the npm and node.js installation (async from environment creation)
"updateContentCommand": "npm install",
// Upon environment create, and after the user session is created, run the server
"postAttachCommand": {
"server": "npm start"
},
"customizations": {
// Configure codespaces to open the application source on start
"codespaces": {
"openFiles": [
"src/App.js"
]
}
},
// Configure the environment to open a browser to the application on port 3000
"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [3000]
}