p5.js-web-editor/index.js
Francis Li 76a81bb1a0 Fixes #497 by adding support for an optional new env variable, S3_BUCKET_URL_BASE (#499)
* Fixes #497 by adding support for an optional new env variable, S3_BUCKET_URL_BASE

* Add a section to README about optional S3 bucket URL base configuration.
2017-12-13 14:56:24 -05:00

14 lines
577 B
JavaScript

if (process.env.NODE_ENV === 'production') {
process.env.webpackAssets = JSON.stringify(require('./static/dist/manifest.json'));
process.env.webpackChunkAssets = JSON.stringify(require('./static/dist/chunk-manifest.json'));
}
require('babel-register');
require('babel-polyfill');
let parsed = require('dotenv').config();
//// in development, let .env values override those in the environment already (i.e. in docker-compose.yml)
if (process.env.NODE_ENV === 'development') {
for (let key in parsed) {
process.env[key] = parsed[key];
}
}
require('./server/server');