Skip to content

Repository files navigation

Base API

This is a customizable starter api application built using NodeJS and ExpressJS.

Features

  • Rest API
  • Database (postgres) Configurable to desired database
  • Logging (pino)
  • Tests (Unit, Integration and e2e)
  • Docker
  • Linting
  • Code formatting
  • Dependency Inject Architecture

Project Setup

Sample commands are for linux platforms.

Create a .env file in the root directory.

    touch .env

Copy the variables in the .env.example into the .env file.

    cp .env.example .env

Use the node version stated in the .nvmrc file.

    nvm use

You can use node version manager (nvm) to use multiple node versions on your system. Windows or Linux

Run Locally

Install dependencies

  yarn install

Start the server in development mode

  yarn dev

Start the server in production mode

Build

    yarn build

Start

    yarn start

Running Tests

Create a .env.test file in the tests util directory.

    touch tests/utils/.env.test

Copy the variables in the .env.example into the .env file and fill with test credentials.

    cp .env.example tests/utils/.env.test

Test

  yarn test

Test Coverage

    yarn test:coverage

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages