Skip to content

Boilerplate template of a test ready API, written with Node.js and Express

License

Notifications You must be signed in to change notification settings

jtymburski/node-api-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js API Backend Template

Description

A template ready boilerplate of a node.js backend API with sample endpoints and NoSQL MongoDB connection. It is built to be run inside a docker container for development, testing and continuous integration

Getting Started

Prerequisites

Development

To start

  1. Open a terminal in the root directory of the project
  2. cd node
  3. npm install
  4. cd ..
  5. ./run.sh dev up

Once complete, the project will now be running in the docker container and accessible on the localhost. The design is viewable in Swagger on port 8081. The MongoDB express admin interface can be accessed on port 8082

Any code changes are monitored using nodemon and will cause the node server to restart automatically

To stop

  1. ./run.sh dev down

Testing

Make sure that is successfully runs on development before testing

To run

  1. Open a terminal in the root directory of the project
  2. ./run.sh test upsync

To clean up

  1. ./run.sh test down

Libraries

Runtime

  • Node.js - JavaScript Runtime Environment
  • NPM - JavaScript Package Manager
  • Express - Minimalist Web Framework
  • MongoDB - NoSQL General Document Database
  • Swagger - API Design Framework

Testing

  • Chai - TDD Assertion Library
  • Mocha - Asynchronous Test Framework

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Boilerplate template of a test ready API, written with Node.js and Express

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published