Skip to content

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

License

Notifications You must be signed in to change notification settings

mihaur/node-fastify-template

Folders and files

NameName
Last commit message
Last commit date
Dec 18, 2024
Oct 7, 2024
Jul 7, 2022
Dec 16, 2024
Oct 24, 2024
Oct 11, 2024
Mar 29, 2023
Oct 12, 2024
Oct 12, 2024
Jul 17, 2020
Dec 16, 2024
Oct 11, 2024
Feb 24, 2025
Feb 24, 2025

Repository files navigation

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 git@github.com: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.

Unit tests

Unit tests are located in src/component/__test/component.test.js. Unit tests are executed by Node test runner using npm run test:unit.

Integration tests

Integration tests are located in test/**.test.js. Integration tests are executed by Node test runner using npm run test.

Coverage reports

Uae npm run coverage to show coverage in the console or npm run coverage:lcov to generate a lcov report.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published