Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.07 KB

File metadata and controls

51 lines (34 loc) · 1.07 KB

Boilerplate for building APIs with Express, MongoDB and Docker

This project is a boilerplate providing an API built with Express and connected to MongoDB using mongoose. It uses Ava for testing and everything runs in containers using Docker Compose.

Usage

While you're testing you can just build the containers and keep the tests running:

npm run docker:build
npm run docker:test:watch

When you want to run the application in development mode, use the following commands:

npm run docker:build
npm run docker:dev

Commands

Build the Docker images defined in the Docker Compose file:

npm run docker:build

Rebuild all images without using the cache (clean rebuild):

npm run docker:rebuild

Run the development environment (accessible through http://localhost:3000):

npm run docker:dev

Run the tests in Docker with coverage:

npm run docker:test

Run the tests and keep watching for changes:

npm run docker:test:watch