https://github.com/dentednerd/nc-games-graphql-api
https://github.com/dentednerd/nc-games-graphql-api
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dentednerd/nc-games-graphql-api
- Owner: dentednerd
- Created: 2021-09-17T11:20:28.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-17T15:20:39.000Z (almost 5 years ago)
- Last Synced: 2025-02-07T00:32:02.328Z (over 1 year ago)
- Language: JavaScript
- Size: 402 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```