1
Fork 0
photoview/api
viktorstrate e965187ed6 Add install guide to readme
Update dependencies
2019-08-30 16:27:24 +02:00
..
src Add docker-compose with proxy 2019-08-30 15:43:24 +02:00
.babelrc Add semantic ui, refactoring 2019-07-07 23:53:07 +02:00
.dockerignore Add docker support 2019-07-29 23:39:38 +02:00
.env Hash passwords with bcrypt 2019-08-20 16:37:15 +02:00
.eslintrc.json Hash passwords with bcrypt 2019-08-20 16:37:15 +02:00
Dockerfile Work on sharing + some security hardening 2019-08-14 23:57:07 +02:00
README.md Work towards authentication 2019-07-05 00:36:32 +02:00
package-lock.json Add install guide to readme 2019-08-30 16:27:24 +02:00
package.json Add install guide to readme 2019-08-30 16:27:24 +02:00

README.md

GRANDstack Starter - GraphQL API

Quick Start

Install dependencies:

npm install

Start the GraphQL service:

npm start

This will start the GraphQL service (by default on localhost:4000) where you can issue GraphQL requests or access GraphQL Playground in the browser:

GraphQL Playground

Configure

Set your Neo4j connection string and credentials in .env. For example:

.env

NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=letmein

Note that grand-stack-starter does not currently bundle a distribution of Neo4j. You can download Neo4j Desktop and run locally for development, spin up a hosted Neo4j Sandbox instance, run Neo4j in one of the many cloud options, or spin up Neo4j in a Docker container. Just be sure to update the Neo4j connection string and credentials accordingly in .env.

Deployment

You can deploy to any service that hosts Node.js apps, but Zeit Now is a great easy to use service for hosting your app that has an easy to use free plan for small projects.

To deploy your GraphQL service on Zeit Now, first install Now Desktop - you'll need to provide an email address. Then run

now

to deploy your GraphQL service on Zeit Now. Once deployed you'll be given a fresh URL that represents the current state of your application where you can access your GraphQL endpoint and GraphQL Playgound. For example: https://grand-stack-starter-api-pqdeodpvok.now.sh/

Seeding The Database

Optionally you can seed the GraphQL service by executing mutations that will write sample data to the database:

npm run seedDb