A tutorial for creating a test-driven REST API using Mongoose, Express, Node and Supertest. And dogs.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
node_modules
server
test
.jshintrc
README.md
package.json
server.js

README.md

No REST for the whippet

A tutorial for creating a test-driven REST API using Mongoose, Express, Node and Supertest. And dogs.

Whippet with knitted deer antlers

About this tutorial

This tutorial is split into a series of git tags. Each tag adds a certain part of new functionality to the REST API, up to the final tag, which demonstrates a fully working, tested REST API. For manipulating dogs.

Checkout the tags in order to view the REST API being built-up, step by step, in a test-driven way.

Requirements

You need to install the following to get this tutorial working:

Running the server

Make sure MongoDB is alive and running.

Run npm start to start the API server.

Alternatively, run nodemon to have Nodemon watch your files for changes and automatically restart the express server when changes are made.

Running the tests

Run npm test to run the test suite.