Skip to content

travi-org/api

Folders and files

NameName
Last commit message
Last commit date
Dec 16, 2020
Feb 13, 2017
Dec 23, 2016
May 12, 2020
Mar 11, 2018
Jun 11, 2020
Aug 27, 2017
Jan 25, 2016
Feb 4, 2018
Dec 23, 2016
Mar 11, 2018
Dec 23, 2016
May 12, 2020
May 20, 2015
Aug 9, 2017
Feb 20, 2020
Dec 23, 2016
Jun 11, 2020
Sep 29, 2019
Dec 1, 2021
May 12, 2020
May 1, 2020
Dec 23, 2016
Dec 23, 2016
Dec 13, 2020
Nov 25, 2015
Mar 3, 2017
Aug 28, 2023
Apr 25, 2023

Repository files navigation

API for Travi.org

Coverage Status Code Climate travi.org-admin/travi-api Pact Status Node CI Workflow Status

license

Try It

You can interact with the api through the Swagger UI instance hosted with the API.

Project Goals

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

Contribution

Commitizen friendly Renovate

Environment variables

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.

Database

Postgres is used as the database.

Initial setup for this application

$ psql -c 'create database travi_api;'

Management with Homebrew

Installation
$ brew install postgresql
Troubleshooting
Ensure the service is started
$ brew services list
$ brew services start postgresql
View the log
$ tail /usr/local/var/postgres/server.log
Remove the pid file
$ rm /usr/local/var/postgres/postmaster.pid
Rebuild everything
$ rm -rf /usr/local/var/postgres
$ initdb -D /usr/local/var/postgres
$ createdb