File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22require ( 'reify' ) ;
3- const path = require ( 'path' ) ;
4- const express = require ( 'express' ) ;
5- const cors = require ( 'cors' ) ;
6- const JsonGraphqlServer = require ( '../lib/json-graphql-server.node.min' ) . default ;
3+ var path = require ( 'path' ) ;
4+ var express = require ( 'express' ) ;
5+ var cors = require ( 'cors' ) ;
6+ var JsonGraphqlServer = require ( '../lib/json-graphql-server.node.min' ) . default ;
77
8- const dataFilePath = process . argv . length > 2 ? process . argv [ 2 ] : './data.json' ;
9- const data = require ( path . join ( process . cwd ( ) , dataFilePath ) ) ;
10- const PORT = 3000 ;
11- const app = express ( ) ;
8+ var dataFilePath = process . argv . length > 2 ? process . argv [ 2 ] : './data.json' ;
9+ var data = require ( path . join ( process . cwd ( ) , dataFilePath ) ) ;
10+ var PORT = 3000 ;
11+ var app = express ( ) ;
1212
1313app . use ( cors ( ) ) ;
1414app . use ( '/' , JsonGraphqlServer ( data ) ) ;
1515app . listen ( PORT ) ;
16- const msg = `GraphQL server running with your data at http://localhost:${ PORT } /` ;
16+ var msg = `GraphQL server running with your data at http://localhost:${ PORT } /` ;
1717console . log ( msg ) ; // eslint-disable-line no-console
1818
1919process . on ( 'unhandledRejection' , ( reason , p ) => {
You can’t perform that action at this time.
0 commit comments