Skip to content

nathan995/ultimate-feed-api

Repository files navigation

Ultimate Feed API

Repository for the main backend api in the Ultimate Feed project .

Getting started

# 1. Clone this repository.

# 2. Enter your newly-cloned folder.
$ cd ultimate-feed

# 3. Create Environment variables file.
$ cp .env.example .env

Installation

npm install

Database

The project uses PostgresSQL as a database

Configuration

fill correct configuration in env file

DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=ultimate-feed

Migrations

# 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

Running the app

# build
$ npm run build

# watch mode
$ npm run start:dev

# debug mode
$ npm run start:debug

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Documentation

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

  1. Architecture
  2. Naming Cheatsheet

Git Workflow

Branchs

  • 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

Commits

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published