This is the set of starter files for Nathan Thomas' GraphQL Article. Note that this server does not satisfactorily run on initial clone. You will need to follow along in my article to flesh it out.
-
Fork or clone the repository
-
Add a
.env
file with the following conditions- Create a
PORT
variable with the port number you want to run your server on (defaults to8000
if you don't set anything) - Implement a database instance of PostgreSQL somewhere such as Heroku and assign the URL for that cluster to
DATABASE_URL
in your .env file
- Create a
-
Install all full dependencies with
yarn
ornpm install
including:cors
dotenv
helmet
faker
graphql
graphql-playground-middleware-express
knex
pg
nodemon
jest
-
Migrate all tables to your PostgreSQL instance by using the command
npx knex migrate:latest
in the root directory -
Run all seeds to populate dummy data in the database by using the command
npx knex seed:run
in the root directory -
Run
yarn server
ornpm run server
to launch server