Showing
16 changed files
with
204 additions
and
0 deletions
.env
0 → 100644
| 1 | +# Environment variables declared in this file are automatically made available to Prisma. | |
| 2 | +# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema | |
| 3 | + | |
| 4 | +# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. | |
| 5 | +# See the documentation for all the connection string options: https://pris.ly/d/connection-strings | |
| 6 | + | |
| 7 | +DATABASE_URL="mysql://root:toor@localhost:3306/base-db" | |
| 8 | + | |
| 9 | +#TESTING DATABASE . CHANGE TO YOUR OWN DATA | |
| 10 | +DB_HOST=base-database | |
| 11 | +DB_ROOT_PASSWORD=toor | |
| 12 | +DB_NAME=base-db | |
| 13 | +DB_USER=admin | |
| 14 | +DB_USER_PASSWORD=basePassw | |
| 15 | +DB_PORT=3306 | |
| 16 | +DB_DRIVER=mysql | |
| \ No newline at end of file | ... | ... |
.eslintrc.js
0 → 100644
| 1 | +module.exports = { | |
| 2 | + parser: '@typescript-eslint/parser', | |
| 3 | + parserOptions: { | |
| 4 | + project: 'tsconfig.json', | |
| 5 | + tsconfigRootDir: __dirname, | |
| 6 | + sourceType: 'module', | |
| 7 | + }, | |
| 8 | + plugins: ['@typescript-eslint/eslint-plugin'], | |
| 9 | + extends: [ | |
| 10 | + 'plugin:@typescript-eslint/recommended', | |
| 11 | + 'plugin:prettier/recommended', | |
| 12 | + ], | |
| 13 | + root: true, | |
| 14 | + env: { | |
| 15 | + node: true, | |
| 16 | + jest: true, | |
| 17 | + }, | |
| 18 | + ignorePatterns: ['.eslintrc.js'], | |
| 19 | + rules: { | |
| 20 | + '@typescript-eslint/interface-name-prefix': 'off', | |
| 21 | + '@typescript-eslint/explicit-function-return-type': 'off', | |
| 22 | + '@typescript-eslint/explicit-module-boundary-types': 'off', | |
| 23 | + '@typescript-eslint/no-explicit-any': 'off', | |
| 24 | + }, | |
| 25 | +}; | ... | ... |
.gitignore
0 → 100644
| 1 | +# compiled output | |
| 2 | +/dist | |
| 3 | +/node_modules | |
| 4 | + | |
| 5 | +# Logs | |
| 6 | +logs | |
| 7 | +*.log | |
| 8 | +npm-debug.log* | |
| 9 | +pnpm-debug.log* | |
| 10 | +yarn-debug.log* | |
| 11 | +yarn-error.log* | |
| 12 | +lerna-debug.log* | |
| 13 | + | |
| 14 | +# OS | |
| 15 | +.DS_Store | |
| 16 | + | |
| 17 | +# Tests | |
| 18 | +/coverage | |
| 19 | +/.nyc_output | |
| 20 | + | |
| 21 | +# IDEs and editors | |
| 22 | +/.idea | |
| 23 | +.project | |
| 24 | +.classpath | |
| 25 | +.c9/ | |
| 26 | +*.launch | |
| 27 | +.settings/ | |
| 28 | +*.sublime-workspace | |
| 29 | + | |
| 30 | +# IDE - VSCode | |
| 31 | +.vscode/* | |
| 32 | +!.vscode/settings.json | |
| 33 | +!.vscode/tasks.json | |
| 34 | +!.vscode/launch.json | |
| 35 | +!.vscode/extensions.json | |
| \ No newline at end of file | ... | ... |
.husky/pre-commit
0 → 100755
.prettierrc
0 → 100644
README.md
0 → 100644
| 1 | +## Description | |
| 2 | + | |
| 3 | +[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | |
| 4 | + | |
| 5 | +## Installation | |
| 6 | + | |
| 7 | +```bash | |
| 8 | +$ npm install | |
| 9 | +``` | |
| 10 | + | |
| 11 | +## Running the app | |
| 12 | + | |
| 13 | +[More info about CLI](https://docs.nestjs.com/cli/overview) | |
| 14 | + | |
| 15 | +```bash | |
| 16 | +$ nest g resource <module name> | |
| 17 | + | |
| 18 | +``` | |
| 19 | + | |
| 20 | +## Create new module | |
| 21 | + | |
| 22 | +```bash | |
| 23 | +# development | |
| 24 | +$ npm run start | |
| 25 | + | |
| 26 | +# watch mode | |
| 27 | +$ npm run start:dev | |
| 28 | + | |
| 29 | +# production mode | |
| 30 | +$ npm run start:prod | |
| 31 | +``` | |
| 32 | + | |
| 33 | +## Test | |
| 34 | + | |
| 35 | +```bash | |
| 36 | +# unit tests | |
| 37 | +$ npm run test | |
| 38 | + | |
| 39 | +# e2e tests | |
| 40 | +$ npm run test:e2e | |
| 41 | + | |
| 42 | +# test coverage | |
| 43 | +$ npm run test:cov | |
| 44 | +``` | |
| 45 | + | |
| 46 | +## Support | |
| 47 | + | |
| 48 | +Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). | |
| 49 | + | |
| 50 | +## Stay in touch | |
| 51 | + | |
| 52 | +- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) | |
| 53 | +- Website - [https://nestjs.com](https://nestjs.com/) | |
| 54 | +- Twitter - [@nestframework](https://twitter.com/nestframework) | |
| 55 | + | |
| 56 | +## License | |
| 57 | + | |
| 58 | +Nest is [MIT licensed](LICENSE). | ... | ... |
docker-compose.yaml
0 → 100644
| 1 | +version: '3.9' | |
| 2 | +services: | |
| 3 | + mysql: | |
| 4 | + image: mysql:8.0 | |
| 5 | + container_name: base-database | |
| 6 | + restart: always | |
| 7 | + environment: | |
| 8 | + MYSQL_ROOT_PASSWORD: '${DB_ROOT_PASSWORD}' | |
| 9 | + MYSQL_DATABASE: '${DB_NAME}' | |
| 10 | + MYSQL_USER: '${DB_USER}' | |
| 11 | + MYSQL_PASSWORD: '${DB_USER_PASSWORD}' | |
| 12 | + ports: | |
| 13 | + - '3306:3306' | |
| 14 | + env_file: | |
| 15 | + - .env | ... | ... |
nest-cli.json
0 → 100644
prisma/migrations/migration_lock.toml
0 → 100644
src/app/app.service.ts
0 → 100644
src/app/interceptors/decrypt.interceptor.ts
0 → 100644
src/auth/constants.ts
0 → 100644
| 1 | +export const jwtConstants = { secret: 'ditobanxSecret' }; | ... | ... |
src/users/dto/create-user.dto.ts
0 → 100644
| 1 | +export class CreateUserDto { } | ... | ... |
src/users/entities/user.entity.ts
0 → 100644
| 1 | +export class User {} | ... | ... |
tsconfig.build.json
0 → 100644
tsconfig.json
0 → 100644
| 1 | +{ | |
| 2 | + "compilerOptions": { | |
| 3 | + "module": "commonjs", | |
| 4 | + "declaration": true, | |
| 5 | + "removeComments": true, | |
| 6 | + "emitDecoratorMetadata": true, | |
| 7 | + "experimentalDecorators": true, | |
| 8 | + "allowSyntheticDefaultImports": true, | |
| 9 | + "target": "ES2021", | |
| 10 | + "sourceMap": true, | |
| 11 | + "outDir": "./dist", | |
| 12 | + "baseUrl": "./", | |
| 13 | + "incremental": true, | |
| 14 | + "skipLibCheck": true, | |
| 15 | + "strictNullChecks": true, | |
| 16 | + "noImplicitAny": false, | |
| 17 | + "strictBindCallApply": true, | |
| 18 | + "forceConsistentCasingInFileNames": true, | |
| 19 | + "noFallthroughCasesInSwitch": true | |
| 20 | + } | |
| 21 | +} | ... | ... |
Please
register
or
login
to post a comment