- Install dependencies via npm:
npm i # (for local setup)
Note: If you are facing any dependency issues, you can try
---legacy-peer-deps
.
- Create .env file identical to example.env with valid values
- We have used keyfile based jwt authentication, so you need to create a valid public and private key. You can create from here https://travistidwell.com/jsencrypt/demo/
- You need to have twitch api key and secret. You can get it from here https://dev.twitch.tv/console/apps/
- You need to have a valid postgresql database. You can create one from here https://www.postgresql.org/ 6.To start the server
npm start or npm run start:dev
- Please get the
Game-App.postman_collection.json
file from directory and import it in postman.
Common structure that is used in this project is as following
.
└── src
└── app
└── module
├── module.entiry.js
├── module.controller.js
├── module.module.js
└── module.service.js
File | Usage/Description |
---|---|
module.entiry.js | Entity will be used for define database model |
module.controller.js | Controller will be used for basic validation and send request to service |
module.module.js | Module used for resolve other module and provider relationships and dependencies. |
module.service.js | In service file we write our main business login |
For running a migration, you need to run the following command
- Update Database url in typeorm.json file
- Run command
npm run typeorm:run
For testing, you need to run the following command
- Run command
npm run test:e2e