Skip to content

perassi/bizcase-api

Repository files navigation

Bizcase API

Tech Stacks

  • Language: NodeJS + TypeScript
  • Runtime: NodeJS 10.x
  • DataBase: PostgresSQL
  • Framework: NestJS
  • ORM: TypeORM
  • Docker with docker-compose
  • Jenkins for CI/CD

Installation

$ yarn

Configuration

API keys and secrets

You should pass env vars directly from the shell. In development mode, you can create the .env file. See example in .example.env.

# Copy env example file for default settings
cp .env.example .env

TypeORM config

2 TypeORM is used and they are specified in .env file and configured from src/database.config.ts.

Create database

You should create database before the first time you run the repo locally.

# use default docker-compose
docker-compose up -d

# OR use environment variables docker-compose
POSTGRES_DB=biz_case POSTGRES_PORT=5432 POSTGRES_PASSWORD=postgres POSTGRES_PASSWORD=postgres docker-compose up -d

Development

Start Development Server

# development in watch mode
$ yarn dev

# debug
$ yarn start:debug

Linting

$ yarn lint

Test

$ yarn test

# in watch mode
$ yarn test:watch

Production

$ docker-compose -p bizcase-api up

API Documentation

$ yarn dev
# or
$ yarn build && yarn start:prod

You can see swagger documentation from http://{{host}}:{{port}}/docs.

Releases

No releases published

Packages

No packages published

Languages