You can interact with the api through the Swagger UI instance hosted with the API.
I'm using this as an opportunity to learn how to apply a number of core concepts of api development to node.
- HAL compatible Hypermedia/HATEOAS API
- Access Control
- Limited read-only access with no auth context
- Privilege elevation for advanced actions
- Either OAuth or Oz for authorization
- Consumer Driven Contracts
- Pact Provider
- Leverage the broker the share pacts from consumers
This application uses environment variables for certain configuration. For local
development, the npm script dev
expects a .env
file to exist, as described
here
and contain the necessary variable definitions.
Postgres is used as the database.
$ psql -c 'create database travi_api;'
$ brew install postgresql
$ brew services list
$ brew services start postgresql
$ tail /usr/local/var/postgres/server.log
$ rm /usr/local/var/postgres/postmaster.pid
$ rm -rf /usr/local/var/postgres
$ initdb -D /usr/local/var/postgres
$ createdb