Twitter Mini is a backend RESTful API project replicating some twitter functionality implemented with NestJS framework and postgresql database.
Create a file .env
at the root of the project directory following the sample provided in the file .env.example
. Samples are given below also,
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=twitter_mini_dev
POSTGRES_PASS=twitter_mini_dev
POSTGRES_DB=twitterdb
JWT_SECRET=HardToGuess
PORT=3000
$ npm install
$ npm run build
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
After successfully running the app, we can visit the swagger documentaion page.
Page address is, <server_url>/api-docs
For example, http://localhost:3000/api-docs
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e