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 1
1
#!/usr/bin/env node
2
2
require ( '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 ;
7
7
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 ( ) ;
12
12
13
13
app . use ( cors ( ) ) ;
14
14
app . use ( '/' , JsonGraphqlServer ( data ) ) ;
15
15
app . 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 } /` ;
17
17
console . log ( msg ) ; // eslint-disable-line no-console
18
18
19
19
process . on ( 'unhandledRejection' , ( reason , p ) => {
You can’t perform that action at this time.
0 commit comments