From ff350d6c0ea1f3c12076349bd64b7df1318878ad Mon Sep 17 00:00:00 2001 From: MetaMuffin Date: Fri, 6 Aug 2021 14:44:49 +0200 Subject: fixed production env --- source/server/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/server/index.ts') diff --git a/source/server/index.ts b/source/server/index.ts index f9d0e6e..f37a0b9 100644 --- a/source/server/index.ts +++ b/source/server/index.ts @@ -21,10 +21,12 @@ async function main() { const app_e = Express(); const app = expressWs(app_e).app - if (process.env.PRODUCTION) { + if (process.env.ENV == "production") { + console.log("PRODUCTION MODE!!!"); app.use("/scripts", estatic(join(__dirname, "../../public/dist"))) } else { - const webpackConfig = require('../../webpack.config'); + console.log("DEVELOPMENT MODE!!!"); + const webpackConfig = require('../../webpack.dev'); const compiler = Webpack(webpackConfig) const devMiddleware = WebpackDevMiddleware(compiler, { publicPath: webpackConfig.output.publicPath -- cgit v1.2.3-70-g09d2