make update schema gulp task

This commit is contained in:
Eric Hulburd
2016-01-31 18:08:42 -06:00
parent 51a0e40f55
commit 8af7d33d08
9 changed files with 58 additions and 106 deletions

View File

@@ -7,22 +7,26 @@ import graphQLHTTP from 'express-graphql';
import path from 'path';
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import {Schema} from './config/graphql/schema';
import schema from './config/graphql/schema';
import DB from './config/database';
const APP_PORT = 3000;
const GRAPHQL_PORT = 8080;
var graphql_server = express();
// Expose a GraphQL endpoint
graphql_server.use('/', graphQLHTTP({
graphiql: true,
pretty: true,
schema: Schema,
}));
graphql_server.listen(GRAPHQL_PORT, () => console.log(
`GraphQL Server is now running on http://localhost:${GRAPHQL_PORT}`
));
DB.sync.then(()=>{
// Expose a GraphQL endpoint
graphql_server.use('/', graphQLHTTP({
graphiql: true,
pretty: true,
schema: schema(),
}));
graphql_server.listen(GRAPHQL_PORT, () => console.log(
`GraphQL Server is now running on http://localhost:${GRAPHQL_PORT}`
));
});
/*
* Compile and Serve Relay App w/ Webpack