Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 1.82 KB

README.md

File metadata and controls

63 lines (42 loc) · 1.82 KB

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