Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Question #2

Open
billnbell opened this issue May 14, 2018 · 1 comment
Open

Question #2

billnbell opened this issue May 14, 2018 · 1 comment

Comments

@billnbell
Copy link

billnbell commented May 14, 2018

If we are using express custom index.js do you think this will work?

'use strict'

const express = require('express')
const next = require('next')
const proxy = require('http-proxy-middleware')
const cookieParser = require('cookie-parser')
const cors = require('cors')
const {parse} = require('url')
const fs = require('fs')

const {Env, Entities, GraphQL} = require('./core/config')
const {parseQueryUrl, isDirectory} = require('./core/rules/routes')

console.log('Startup VARS:', Env.nodeEnv)

const port = Env.port || 3000

const conf = require('./next.config')
// TODO: trying to fix the production react bundling isue

console.log('[next config]', Env.nodeEnv !== 'production', Env.nodeEnv)

console.log({conf, dev: Env.dev})
const app = next({conf, dev: Env.dev})
const handle = app.getRequestHandler()

etc...

@jamesgorrie
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants