Skip to content

Commit e35c356

Browse files
authored
Merge pull request #4 from vitabletech/develop
Develop to main
2 parents 8d5c4db + f70eab7 commit e35c356

15 files changed

+74
-180
lines changed

.devcontainer/.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PORT=5000
2+
DB_PASSWORD=notSecureChangeMe
3+
NODE_ENV=development
4+
APP_PORT=8080
5+
PHPMYADMIN_PORT=8081
6+
7+
GIT_USERNAME=msrajawat298

.devcontainer/devcontainer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "node-express-api-bootstrap",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "app",
5+
"workspaceFolder": "/app",
6+
"mounts": [
7+
"source=${localWorkspaceFolder}/,target=/app,type=bind,consistency=cached"
8+
],
9+
"postCreateCommand": "/app/.devcontainer/postCreateCommands.sh",
10+
"customizations": {
11+
// Configure properties specific to VS Code.
12+
"vscode": {
13+
// Add the IDs of extensions you want installed when the container is created.
14+
"extensions": [
15+
"christian-kohler.path-intellisense",
16+
"dbaeumer.vscode-eslint",
17+
"ms-azuretools.vscode-docker",
18+
"ritwickdey.liveserver",
19+
"rvest.vs-code-prettier-eslint",
20+
"sonarsource.sonarlint-vscode",
21+
"streetsidesoftware.code-spell-checker",
22+
"orta.vscode-jest",
23+
"vitabletech.snippetmaster",
24+
// "alefragnani.project-manager",
25+
// "github.copilot",
26+
// "github.copilot-chat",
27+
// "hoovercj.vscode-power-mode",
28+
// "jasonnutter.search-node-modules",
29+
// "ms-vscode-remote.remote-containers",
30+
// "ms-vscode.vscode-speech",
31+
// "sburg.vscode-javascript-booster",
32+
]
33+
}
34+
}
35+
}

docker-compose.yml renamed to .devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
volumes:
88
- .:/app
99
working_dir: /app
10-
command: bash -c "chmod +x ./setup.sh && ./setup.sh"
10+
command: bash -c "tail -f /dev/null"
1111
ports:
1212
- "${APP_PORT}:${PORT}" # Use the port number defined in .env for the host
1313
env_file:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Set up Git
4+
git config --global user.email $GIT_EMAIL
5+
git config --global user.name $GIT_USERNAME
6+
7+
# Install dependencies
8+
npm install
9+
10+
# Run the appropriate command based on the NODE_ENV variable
11+
if [[ $NODE_ENV == 'development' ]]; then
12+
npm run dev
13+
else
14+
npm start
15+
fi

.env_sample

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,4 @@ DB_DIALECT=mysql
88
DB_POOL_MAX=5
99
DB_POOL_MIN=0
1010
DB_POOL_ACQUIRE=30000
11-
DB_POOL_IDLE=10000
12-
NODE_ENV=development
13-
APP_PORT=80
14-
PHPMYADMIN_PORT=8081
15-
16-
GIT_USERNAME=msrajawat298
11+
DB_POOL_IDLE=10000

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ web_modules/
8080
.env.test.local
8181
.env.production.local
8282
.env.local
83-
83+
!.devcontainer/.env
8484
# parcel-bundler cache (https://parceljs.org/)
8585
.cache
8686
.parcel-cache

.husky/pre-commit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
npx lint-staged
1+
npm run lint
2+
npx lint-staged
3+
npm run test:coverage

.vscode/extensions.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

coverage/lcov.info

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ DA:11,0
1111
DA:12,0
1212
LF:5
1313
LH:0
14-
BRDA:10,0,0,0
15-
BRDA:10,0,1,0
16-
BRF:2
14+
BRF:0
1715
BRH:0
1816
end_of_record
1917
TN:

0 commit comments

Comments
 (0)