generated from rolling-scopes-school/nodejs-course-template
-
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 85ce308
Showing
28 changed files
with
18,926 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,7 @@ | ||
PORT=4000 | ||
|
||
CRYPT_SALT=10 | ||
JWT_SECRET_KEY=secret123123 | ||
JWT_SECRET_REFRESH_KEY=secret123123 | ||
TOKEN_EXPIRE_TIME=1h | ||
TOKEN_REFRESH_EXPIRE_TIME=24h |
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 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': '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,35 @@ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json |
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, | ||
"trailingComma": "all" | ||
} |
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,72 @@ | ||
# Home Library Service | ||
|
||
## Prerequisites | ||
|
||
- Git - [Download & Install Git](https://git-scm.com/downloads). | ||
- Node.js - [Download & Install Node.js](https://nodejs.org/en/download/) and the npm package manager. | ||
|
||
## Downloading | ||
|
||
``` | ||
git clone {repository URL} | ||
``` | ||
|
||
## Installing NPM modules | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Running application | ||
|
||
``` | ||
npm start | ||
``` | ||
|
||
After starting the app on port (4000 as default) you can open | ||
in your browser OpenAPI documentation by typing http://localhost:4000/doc/. | ||
For more information about OpenAPI/Swagger please visit https://swagger.io/. | ||
|
||
## Testing | ||
|
||
After application running open new terminal and enter: | ||
|
||
To run all tests without authorization | ||
|
||
``` | ||
npm run test | ||
``` | ||
|
||
To run only one of all test suites | ||
|
||
``` | ||
npm run test -- <path to suite> | ||
``` | ||
|
||
To run all test with authorization | ||
|
||
``` | ||
npm run test:auth | ||
``` | ||
|
||
To run only specific test suite with authorization | ||
|
||
``` | ||
npm run test:auth -- <path to suite> | ||
``` | ||
|
||
### Auto-fix and format | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
``` | ||
npm run format | ||
``` | ||
|
||
### Debugging in VSCode | ||
|
||
Press <kbd>F5</kbd> to debug. | ||
|
||
For more information, visit: https://code.visualstudio.com/docs/editor/debugging |
Oops, something went wrong.