Removed config file.

At the scale of this example, it is not nessesary.
This commit is contained in:
Jayden Seric 2017-04-09 13:16:56 +10:00
parent 6492ba8fef
commit 21c28e87fe
3 changed files with 3 additions and 8 deletions

View File

@ -1,4 +0,0 @@
import path from 'path'
export const distPath = path.resolve(__dirname, 'dist')
export const apiEndpoint = '/graphql'

View File

@ -7,7 +7,6 @@ import koaBody from 'koa-bodyparser'
import {makeExecutableSchema} from 'graphql-tools' import {makeExecutableSchema} from 'graphql-tools'
import {graphqlKoa} from 'graphql-server-koa' import {graphqlKoa} from 'graphql-server-koa'
import {apolloUploadKoa} from 'apollo-upload-server' import {apolloUploadKoa} from 'apollo-upload-server'
import {apiEndpoint} from './config'
import typeDefs from './schema.graphql' import typeDefs from './schema.graphql'
import resolvers from './resolvers' import resolvers from './resolvers'
@ -29,7 +28,7 @@ app.use(koaBody())
// GraphQL API // GraphQL API
router.post( router.post(
apiEndpoint, '/graphql',
apolloUploadKoa({ apolloUploadKoa({
uploadDir: '/tmp/uploads' uploadDir: '/tmp/uploads'
}), }),

View File

@ -1,5 +1,5 @@
import path from 'path'
import {NoEmitOnErrorsPlugin} from 'webpack' import {NoEmitOnErrorsPlugin} from 'webpack'
import {distPath} from './config'
const config = { const config = {
devtool: 'source-map', devtool: 'source-map',
@ -7,7 +7,7 @@ const config = {
index: './server.js' index: './server.js'
}, },
output: { output: {
path: distPath, path: path.resolve(__dirname, 'dist'),
filename: '[name].js', filename: '[name].js',
libraryTarget: 'commonjs2' libraryTarget: 'commonjs2'
}, },