{"size": 733, "ext": "js", "max_stars_repo_path": "app.js", "max_stars_repo_name": "ludichrislyts/OSCON20Eightteen-graphql", "max_stars_repo_stars_event_min_datetime": "2018-07-17T23:34:34.000Z", "max_stars_repo_stars_event_max_datetime": "2019-12-23T14:25:13.000Z", "max_issues_repo_path": "app.js", "max_issues_repo_name": "ludichrislyts/OSCON20Eightteen-graphql", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app.js", "max_forks_repo_name": "ludichrislyts/OSCON20Eightteen-graphql", "max_forks_repo_forks_event_min_datetime": "2018-07-17T20:11:23.000Z", "max_forks_repo_forks_event_max_datetime": "2018-07-17T21:35:11.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 20.3611111111, "max_line_length": 62, "alphanum_fraction": 0.7012278308}
import express from 'express'
import graphqlHTTP from 'express-graphql'
import http from 'http'

import { graphql, buildSchema } from 'graphql'

// Construct a schema, using GraphQL schema language
var schema = buildSchema(`
  type Query {
    hello: String
  }
`);

// The root provides a resolver function for each API endpoint
var root = {
  hello: () => {
    return 'Hello world!';
  },
}

// The canonical simplest graphQL server there ever was
var app = express()
const server = http.createServer(app)

app.use('/graphql', graphqlHTTP({
  schema: schema,
  rootValue: root,
  graphiql: true,
}))

server.listen(4000)
console.log(
  'Express server listening on port %d in %s mode',
  server.address().port, app.settings.env
)
