Simple API using nodejs, express, and mongoDB with test suite built using mocha, supertest and expect
GET /api/car - Retrieve all calls
GET /api/car/:id - Retrieve call with id
POST /api/car - Add new car Request body:
- make: string, required
- model: string, required
- colour: string, required
Create folder "config" Inside this folder create file config.js with the following lines: module.exports = { MONGO_DB_URL: "your_db_connection_url" };
Tests can be run using the command npm test
Dockerfile and .dotignore files are added to project. Docker image has been uploaded to docker hub with the name tonyjp/node_test