An open API service indexing awesome lists of open source software.

https://github.com/dentednerd/nc-games-graphql-api


https://github.com/dentednerd/nc-games-graphql-api

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# Northcoders House of Games: GraphQL Edition

A GraphQL and Express API with a PostgreSQL database.

~~[nc-games-sql-dentednerd.herokuapp.com](https://nc-games-sql-dentednerd.herokuapp.com/)~~

## requirements

- Node v14.17.4: [download](https://nodejs.org/)
- PostgreSQL v13.3: `brew install postgresql`
- Heroku CLI: `brew tap heroku/brew && brew install heroku`

## installation

```sh
git clone https://github.com/dentednerd/be-nc-games.git
cd be-nc-games
npm install
echo PGDATABASE=nc_games_test > .env.test
echo PGDATABASE=nc_games > .env.development
```

## development

```sh
npm run setup-dbs
npm run seed
npm start # server will listen on port 9090 by default
```

## testing

```sh
npm t # jest --verbose
```

## deployment

```sh
# to push to Github:
git push origin main

# to deploy to Heroku:
# ensure that heroku remote exists:
#git remote -v
# if no heroku remote:
#git add remote heroku https://git.heroku.com/nc-games-sql-dentednerd.git
#npm run seed:prod # on first deploy only
#git push heroku main
```