A simple Express app designed to provide a basic API for our code test.
- Node (10+) or an environment like Docker (see below)
-
Run
npm installto install dependencies (skip this step if using Docker) -
Run
npm run migrateto migrate your development database -
Run
npm run seedto seed your development database -
Run
npm startto start up the local development server (skip this step if using Docker)
You should get JSON output from http://localhost:3000/members
Run npm test to run the test suite.
As an alternative to installing node directly, you can use the provided Docker files to run the app and test suite.
Run docker-compose up -d to start the Docker container, then run the Setup tasks above, prepending docker-compose exec web to the command (e.g. docker-compose exec web npm run migrate)
Changes to the app code may require restarts to the node process. To do so, run
docker-compose restart