-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 977c201
Showing
65 changed files
with
11,808 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.git | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Port number | ||
PORT=5000 | ||
|
||
# URL of the Mongo DB | ||
MONGODB_URL=mongodb://127.0.0.1:27017/node-boilerplate | ||
|
||
# JWT | ||
# JWT secret key | ||
JWT_SECRET=thisisasamplesecret | ||
# Number of minutes after which an access token expires | ||
JWT_ACCESS_EXPIRATION_MINUTES=30 | ||
# Number of days after which a refresh token expires | ||
JWT_REFRESH_EXPIRATION_DAYS=30 | ||
# Number of minutes after which a reset password token expires | ||
JWT_RESET_PASSWORD_EXPIRATION_MINUTES=10 | ||
# Number of minutes after which a verify email token expires | ||
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES=10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"jest": true | ||
}, | ||
"extends": ["airbnb-base", "plugin:jest/recommended", "plugin:security/recommended", "plugin:prettier/recommended"], | ||
"plugins": ["jest", "security", "prettier"], | ||
"parserOptions": { | ||
"ecmaVersion": 2018 | ||
}, | ||
"rules": { | ||
"no-console": "error", | ||
"func-names": "off", | ||
"no-underscore-dangle": "off", | ||
"consistent-return": "off", | ||
"jest/expect-expect": "off", | ||
"security/detect-object-injection": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Convert text file line endings to lf | ||
* text eol=lf | ||
*.js text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Dependencies | ||
node_modules | ||
|
||
# Environment varibales | ||
.env* | ||
!.env*.example | ||
|
||
# Code coverage | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"*.js": "eslint" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 125 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM node:16-alpine | ||
|
||
USER root | ||
|
||
WORKDIR . | ||
|
||
COPY package.json . | ||
|
||
RUN npm -g install npm@latest | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
CMD ["npm", "start"] | ||
|
||
# -t means name of your image : means a tag or version . means DockerFile is in current directory | ||
# docker build -t fyp-backend:1.0 . | ||
# docker run -p osPort:dockerPort imageId | ||
# docker rmi -f imageId | ||
# docker rm -f containerId | ||
# docker exec containerId stop | ||
# docker kill --signal=SIGTERM containerId | ||
# docker stop -t time containerId |
Oops, something went wrong.