Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 902 Bytes

README.md

File metadata and controls

59 lines (42 loc) · 902 Bytes

pantry-list-api

A Koa backend for the Pantry List app.

Developing Locally

yarn
yarn start-dev

Server listens on port 4000.

Testing: yarn test-watch

GraphQL

/graphiql is enabled on dev and prod

Deployments

Heroku automatically:

Docker

https://hub.docker.com/r/sharpnotionsllc/pantry-list-api/

  1. copy your npmrc file to dir cp ~/.npmrc .
docker-compose up

Database Miscellanea

For developing against a local db:

psql
CREATE DATABASE pantry_list;
CREATE DATABASE pantry_list_test;

Create migration

yarn create-migration -- <migration name>

Run migrations

yarn migrate

yarn migrate -- --env test

Rollback migrations

yarn migrate-rollback