Simple Express RESTful API for People data designed for use in CI/orchestration PoCs
643
Simple Express RESTful API for People data.
Using as part of testing various build/containerisation PoCs.
npm install
# Start PostGres container
# docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres
# Setup DB
npm run migrations
# available http://localhost:3001/people
npm start
# Spin up PostGres and node-people-api containers
docker-compose up
npm test
The API is documented using API Blueprint at PeopleApi.apib and a friendly static HTML version is generated using aglio which is available on at URL /documentation.html.
The documentation is be updated for changes by:
npm install -g aglio
aglio -i PeopleApi.apib --theme-template triple -o app/documentation/documentation.html
The PeopleApi.apib file can be used by various tools to aid with testing or generating clients.
npm shrinkwrap to fix dependency versionswait-for-postgres.sh script to poll container using knex migrate:currentVersion before running migration scripts, avoiding the need to call migration scripts outside containerContent type
Image
Digest
Size
27.4 MB
Last updated
over 8 years ago
docker pull stevenalexander/node-people-api