- Clone repo
- Install dependencies:
yarn install:all
This app is set up with postgraphile and by default, the development database
is named trackpoint
.
- To install
postgres
via homebrew:brew install postgres
- Create and modify
backend/.env.development
:
PGUSER = "postgres"
PGDDATABASE = "backend"
PGPASSWORD = null
PGHOST = "127.0.0.1"
PGPORT = "5432"
PGURL = "postgres:///backend"
- Modify
backend/config/config.json
to reflect desired db setup:
{
"development": {
"username": "postgres",
"password": null,
"database": "backend",
"host": "127.0.0.1",
"dialect": "postgres"
}
}
- Update
backend/app.ts
to reflect any environment and config changes. If you change the db name, you'll need to change it in thesetup:db
script inpackage.json
tocd backend && createdb [yourdbname]
.
- Run
yarn setup:backend
- Run
yarn start:backend
and in another terminal runyarn generate:frontend
- Run
yarn setup:backend:seed
- Run
yarn start
- Graphiql: http://localhost:5000/graphiql
- API: http://localhost:5000/graphql