2016-11-08 23:11:12 +00:00
|
|
|
if (process.env.NODE_ENV === 'production') {
|
2018-05-04 20:36:59 +00:00
|
|
|
process.env.webpackAssets = JSON.stringify(require('./dist/static/manifest.json'));
|
|
|
|
process.env.webpackChunkAssets = JSON.stringify(require('./dist/static/chunk-manifest.json'));
|
|
|
|
require('./dist/server.bundle.js');
|
2018-05-04 00:20:40 +00:00
|
|
|
} else {
|
2018-06-07 21:49:17 +00:00
|
|
|
let parsed = require('dotenv').config();
|
2018-05-04 21:26:20 +00:00
|
|
|
require('babel-register')({
|
|
|
|
"plugins": [
|
|
|
|
[
|
|
|
|
"babel-plugin-webpack-loaders",
|
|
|
|
{
|
|
|
|
"config": "./webpack.config.babel.js",
|
|
|
|
"verbose": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
});
|
2018-05-04 00:20:40 +00:00
|
|
|
require('babel-polyfill');
|
|
|
|
//// in development, let .env values override those in the environment already (i.e. in docker-compose.yml)
|
2018-05-18 00:45:48 +00:00
|
|
|
// so commenting this out makes the docker container work.
|
|
|
|
// if (process.env.NODE_ENV === 'development') {
|
|
|
|
// for (let key in parsed) {
|
|
|
|
// process.env[key] = parsed[key];
|
|
|
|
// }
|
|
|
|
// }
|
2018-05-04 00:20:40 +00:00
|
|
|
require('./server/server');
|
2017-12-13 19:56:24 +00:00
|
|
|
}
|