Removed config file.
At the scale of this example, it is not nessesary.
This commit is contained in:
parent
6492ba8fef
commit
21c28e87fe
@ -1,4 +0,0 @@
|
|||||||
import path from 'path'
|
|
||||||
|
|
||||||
export const distPath = path.resolve(__dirname, 'dist')
|
|
||||||
export const apiEndpoint = '/graphql'
|
|
||||||
@ -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'
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -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'
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user