Skip to content

Commit 1fc92e7

Browse files
committed
Add initial Flask application with static HTML
- Created a new Flask application in app.py that serves a static HTML file. - Added a launch configuration for debugging the Flask app in VS Code. - Included a requirements.txt file to specify Flask as a dependency. - Added .gitignore and .gitattributes files for better version control management. - Created a static HTML file (index.html) to be served by the Flask application.
1 parent 56b6621 commit 1fc92e7

File tree

15 files changed

+1343
-0
lines changed

15 files changed

+1343
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Node Multi-Container",
3+
"dockerComposeFile": ["../../docker-compose.yml"],
4+
"service": "node-app",
5+
"shutdownAction": "none",
6+
"workspaceFolder": "/workspace/src/node",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Configure tool-specific properties.
12+
"customizations": {
13+
// Configure properties specific to VS Code.
14+
"vscode": {
15+
"settings": {},
16+
"extensions": [
17+
"streetsidesoftware.code-spell-checker"
18+
]
19+
}
20+
},
21+
22+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23+
// "forwardPorts": [3000],
24+
25+
// Use 'portsAttributes' to set default properties for specific forwarded ports.
26+
// More info: https://containers.dev/implementors/json_reference/#port-attributes
27+
"portsAttributes": {
28+
"3000": {
29+
"label": "Hello Remote World",
30+
"onAutoForward": "notify"
31+
}
32+
},
33+
34+
// Use 'postCreateCommand' to run commands after the container is created.
35+
"postCreateCommand": "yarn install"
36+
37+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
38+
// "remoteUser": "root"
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Python Multi-Container",
3+
"dockerComposeFile": ["../../docker-compose.yml"],
4+
"service": "python-api",
5+
"shutdownAction": "none",
6+
"workspaceFolder": "/workspace/src/python",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Configure tool-specific properties.
12+
"customizations": {
13+
// Configure properties specific to VS Code.
14+
"vscode": {
15+
"settings": {},
16+
"extensions": [
17+
"streetsidesoftware.code-spell-checker"
18+
]
19+
}
20+
},
21+
22+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23+
// "forwardPorts": [9000],
24+
25+
// Use 'portsAttributes' to set default properties for specific forwarded ports.
26+
// More info: https://containers.dev/implementors/json_reference/#port-attributes
27+
"portsAttributes": {
28+
"9000": {
29+
"label": "Hello Remote World",
30+
"onAutoForward": "notify"
31+
}
32+
},
33+
34+
// Use 'postCreateCommand' to run commands after the container is created.
35+
"postCreateCommand": "pip3 install -r requirements.txt"
36+
37+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
38+
// "remoteUser": "root"
39+
}

src/node/.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true,
5+
"es6": true
6+
},
7+
"rules": {
8+
"no-console": 0,
9+
"eqeqeq":"warn",
10+
"no-cond-assign": 0,
11+
"no-unused-vars": 1,
12+
"no-extra-semi": "warn",
13+
"semi": "warn"
14+
},
15+
"extends": "eslint:recommended",
16+
"parserOptions": {
17+
"ecmaFeatures": {
18+
"experimentalObjectRestSpread": true
19+
}
20+
}
21+
}

src/node/.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.{cmd,[cC][mM][dD]} text eol=crlf
3+
*.{bat,[bB][aA][tT]} text eol=crlf

0 commit comments

Comments
 (0)