This API is built in NestJS framework with Typescript. It allows to handle a movie store. You can handle users, movies with functions such as like, rent, return and buy. You can also handle two type of users, client and admin.
- run
npm install
- generate database with dump.sql
- watch .envexample for get a guide of how provide your DB credentials and also provide a secret pass for JsonWebToken.
- run
npm run up
- endpoint for login is authentication/login
- payload for login is {email:string,password:string}
- it is setted a default admin, its credentials {email:'[email protected]', password: 'admin@buster'}
Variable | Description |
---|---|
JWT_SECRET | Secret pass used to sign and verify JWT |
DB_PORT | Port of the PostegreSql database |
DB_HOST | Host of the database |
DB_USER | User for access database |
DB_PASS | Password for user access |
DB_NAME | Name of the database |
More examples of use cases of this API can be found here