Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 4.41 KB

README.md

File metadata and controls

84 lines (65 loc) · 4.41 KB

Node.js API server based on fastify + MongoDB project template

neostandard javascript style Conventional Commits GitHub Actions CI Coverage Status MegaLinter

Node.js API server/backend based on fastify and MongoDB as a database for persisting data, GitHub Actions build and code linter, minimal tooling and native node test runner with native coverage. Can be used as a template to quickly bootstrap yor Node.js API http server project.

All features

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

Installing

  • git clone [email protected]:mihaur/node-fastify-template.git
  • cd node-fastify-template
  • cp .env.example .env
  • npm install
  • npm start

Configuring

Use .env to store your environment dependant configuration options and secrets. This file should not be checked in to your repository, use .env.sample as example but exclude real secrets.

Linting and code fixing

Linting is done using neostandard. Use npm run lint to run linter. You can also automatically fix linter errors by running npm run lint:fix.

Integration tests

Integration tests are stored in test/**.spec.js. Tests are run by Node test runner. Run npm run test to run both unit and integration tests.

Coverage reports

Run npm run coverage to generate HTML test coverage report. Web browser is opened after tests are run.