diff --git a/postgraphile/index.js b/postgraphile/index.js index 2ba12c5..e7c0680 100644 --- a/postgraphile/index.js +++ b/postgraphile/index.js @@ -22,6 +22,10 @@ const postgraphileOptions = { }; console.log('database url: ', process.env.DATABASE_URL); + +/** + * pass the database URL to PostGraphile for it to bootstrap the application + */ app.use(postgraphile(process.env.DATABASE_URL, "public", postgraphileOptions)); console.log('port: ', process.env.PORT); diff --git a/postgraphile/readme.md b/postgraphile/readme.md index 3bbd04f..76e05a8 100644 --- a/postgraphile/readme.md +++ b/postgraphile/readme.md @@ -1,5 +1,33 @@ +* foo ``` ssh -N -L 5432:localhost:5432 -p 22 zvbn_nvp@83.223.91.130 npm i node index.js -``` \ No newline at end of file +``` + +* open in browser +``` +http://localhost:/graphiql +``` + +* test +``` +query MyQuery { + allServices { + edges { + node { + routeByRouteId { + shortName + } + routeBundleByRouteBundleId { + longName + } + serviceLevelByServiceLevelId { + longName + shortName + } + } + } + } +} +```