We use the sequelize package for ORM and database connection. To setup the database, make sure you have PostgreSQL installed and run:
yarn db:createThen to run migrations:
yarn db:migrateTo seed your database with a bunch of app data, first create the file .env in the root of this project,
add the contents of the App.co API ENV (development) from 1Password. (Internal Blockstack PBC Engineers only)
There are some ENV variables you should set before running the app. To get started, run cp .env.sample .env to create a .env file. Then, change the values in that file as appropriate.
Run node server.js to start the API server.
Make sure you have created a test database (you only need to run this once):
NODE_ENV=test yarn db:createThen, run tests:
yarn testOr, to automatically watch and re-run tests:
yarn test-watch