- node
- npm
- docker
- dbmate
First, run
npm iThen, bring up the development database with
docker-compose up
dbmate upThen, run the project with
node app.js- Create a user record
curl -X PUT localhost:3000/user -H "Content-Type: application/json" --data '{"name": "Joe Doe", "email": "test@test.com", "date_of_birth": "2000-01-01"}'- Retrieve a user record
curl -X GET localhost:3000/user/{id}- Update a user record
curl -X POST localhost:3000/user/{id} -H "Content-Type: application/json" --data '{"email": "test_two@test.com"}'- Delete a user record
curl -X DELETE localhost:3000/user/{id}First, build the test database using
dbmate -e TEST_DATABASE_URL upThen, run tests with
npm test