Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandrinodimattia/express-mongo-docker-api-boilerplate
This project is a boilerplate providing an API built with Express and connected to MongoDB using Mongoose
https://github.com/sandrinodimattia/express-mongo-docker-api-boilerplate
ava docker docker-compose express mongodb mongoose nodejs pino
Last synced: about 1 month ago
JSON representation
This project is a boilerplate providing an API built with Express and connected to MongoDB using Mongoose
- Host: GitHub
- URL: https://github.com/sandrinodimattia/express-mongo-docker-api-boilerplate
- Owner: sandrinodimattia
- Created: 2017-02-08T21:46:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T15:38:35.000Z (almost 8 years ago)
- Last Synced: 2024-10-16T11:41:17.069Z (3 months ago)
- Topics: ava, docker, docker-compose, express, mongodb, mongoose, nodejs, pino
- Language: JavaScript
- Size: 47.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](http://mongoosejs.com/). It uses [Ava](https://github.com/avajs/ava/blob/master/readme.md) 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:
```bash
npm run docker:build
npm run docker:test:watch
```When you want to run the application in development mode, use the following commands:
```bash
npm run docker:build
npm run docker:dev
```## Commands
Build the Docker images defined in the Docker Compose file:
```bash
npm run docker:build
```Rebuild all images without using the cache (clean rebuild):
```bash
npm run docker:rebuild
```Run the development environment (accessible through http://localhost:3000):
```bash
npm run docker:dev
```Run the tests in Docker with coverage:
```bash
npm run docker:test
```Run the tests and keep watching for changes:
```bash
npm run docker:test:watch
```