Skip to content

IGassmann/nodejs-api

Repository files navigation

IGassmann's Node.js API

REST HTTP API built with NestJS.

Architecture

The API uses an adapted version of Herberto Graca's Explicit Architecture. For simplicity's sake, it only contains one component: ChannelManagement.

The domain layer is encapsulated and applies principles of functional programming inspired by Vladimir Khorikov's blog post series.

Architecture

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Setup

  1. Clone this repository.
  2. Install dependencies by running $ yarn.
  3. Define your .env file (See .env.example).
  4. Run $ yarn dev.

Developing

Testing

Write your tests first and keep them running to catch any undesirable behavior change. The project use Jest as the testing framework. Run this command to keep the tests running on change:

$ yarn test:watch

Tests are automatically run before pushing a branch.

Code Linting

Code linting is handled by ESLint. It's configured to follow Airbnb JavaScript Style Guide. Use the following command for linting all project's files:

$ yarn lint

Staged files are automatically linted before a commit.

Code Formatting

Code formatting is handled by Prettier. Use the following command for formatting all project's files:

$ yarn format

Staged files are automatically formatted before a commit.

About

Node.js Sample API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published