<commit_before>var express = require('express');
var graphqlHTTP = require('express-graphql');
var { buildSchema, Source } = require('graphql');
var fs = require('fs')
var root = require('./src/graphql-root')
var cors = require('cors')

// Construct a schema, using GraphQL schema language

const schemaFile = fs.readFileSync("./src/schema.graphql")

var schema = buildSchema(new Source(schemaFile));

var app = express();

app.use(cors());

app.use('/graphql', graphqlHTTP({
  schema: schema,
  rootValue: root,
  graphiql: false// process.env.NODE_ENV !== 'production',
}));

app.listen(8080);
console.log('Running a GraphQL API server at localhost:8080/graphql');<commit_msg>only run graphiql if not production<commit_after>var express = require('express');
var graphqlHTTP = require('express-graphql');
var { buildSchema, Source } = require('graphql');
var fs = require('fs')
var root = require('./src/graphql-root')
var cors = require('cors')

// Construct a schema, using GraphQL schema language

const schemaFile = fs.readFileSync("./src/schema.graphql")

var schema = buildSchema(new Source(schemaFile));

var app = express();

app.use(cors());

app.use('/graphql', graphqlHTTP({
  schema: schema,
  rootValue: root,
  graphiql: process.env.NODE_ENV !== 'production',
}));

app.listen(8080);
console.log('Running a GraphQL API server at localhost:8080/graphql');
{'fraction_non_alphanumeric': 0.16204379562043797, 'fraction_numerical': 0.01167883211678832, 'mean_word_length': 5.559808612440191, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6490968', 'n_tokens_mistral': 440, 'n_tokens_neox': 425, 'n_words': 113}