Common Room the backend repository for common-room. The current stack involves the following technologies:
- NestJS
- MySQL
- Prisma
- Sequelize
- TypeGraphQL
Prisma has been used as the primary database migration tool and for using as the query client for the resolvers. All CRUD based resolvers and mutations have been genrated automatically using the TypeGraphQL+Prisma. Sequilize is used has been used as the secondary ORM for the admin panel.
- .env present in the root directory
- admin.json in src/config
- firebase.json in src/config
$ npm install
$ yarn prisma generate
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
- Follow offical prisma docs to understand the steps required to migrate. Never migrate dev in production.
- Update schema
- Run migrate dev or prod based on environment
- Run prisma generate
- Run the following commands once the database is updated for sequilize to generate the required files.
$ npm run sequilize