Repository for the main backend api in the Ultimate Feed project .
# 1. Clone this repository.
# 2. Enter your newly-cloned folder.
$ cd ultimate-feed
# 3. Create Environment variables file.
$ cp .env.example .env
npm install
The project uses PostgresSQL as a database
fill correct configuration in env file
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=ultimate-feed
# To create new migration file
$ npm run migration:create migration_name
# Truncate full database (note: it isn't deleting the database)
$ npm run schema:drop
# Generate migration from update of entities
$ npm run migration:generate migration_name
# build
$ npm run build
# watch mode
$ npm run start:dev
# debug mode
$ npm run start:debug
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
This project uses swagger openapi and the api documentation can be found at /documentation
when starting in dev
The code base was made using awesome-nest-boilerplate as a guide and closely follows both the architecture and naming conventions
- master branch: where production ready code lives, rarely merge to here.
- staging branch: environment closely resembling production for testing.
- feature branch(es): used for developing new features or fixing bugs, use naming convention feat/<feature-name> for example feat/user-authentication or feat/<ticket-or-issue>, example feat/YMC-1232
Commit messages should be in the format (<type>) <detailed comment> with type being one of the following
- feat - actual feature implementation
- style - code style and code cleanup
- test - actual test implementation
- fix - bug fix
- refactor - refactoring that doesn't affect the code behavior
- chore - no production code change, but configuration edits and setup
examples
- (feat) add authentication
- (fix) cleanup cookies on logout
- (chor) added .env.example file
- (style) fixed indentation