letstalk-backend is a backend for a reddit style SPA website. It's a personal hobby project of mine. The project uses Nest framework with TypeScript. It also uses TypeORM for Object-Relational Mapping. The frontend is in another repository: lets-talk.
$ npm installThe project requires an ".env.stage.dev" file for the "npm run start:dev" script with the following keys:
- DB_HOST=
- DB_PORT=
- DB_USERNAME=
- DB_Password=
- DB_DATABASE=
- SECRET=
If the configService does not work on your machine. It can be hard coded to use a basic ".env" file by modifying the app.module.ts file and changing the value of "envFilePath:". Then it has to be started with "npm run start" script.
The project by default uses the port 3001 and can be changed at the main.ts file. The frontend uses port 3000 by default.
The project uses MariaDB. Other databases can be used by modifying the app.module.ts file and installing the necessary packages, but I can't quarantee that they will work out of the box.
Google docs link below for more information about the database:
Database Schemas and SQL script content
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov