REST HTTP API built with NestJS.
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.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Git
- Node.js (version specified in the engines field of
package.json
) - Yarn (version specified in the engines field of
package.json
)
- Clone this repository.
- Install dependencies by running
$ yarn
. - Define your
.env
file (See.env.example
). - Run
$ yarn dev
.
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 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 is handled by Prettier. Use the following command for formatting all project's files:
$ yarn format
Staged files are automatically formatted before a commit.