parent
fe267383a2
commit
14a469c556
13
server.js
13
server.js
@ -22,9 +22,12 @@ app.get('/', (req, res) => {
|
||||
|
||||
const server = useHttp ? http : https;
|
||||
|
||||
server.createServer({
|
||||
key: fs.readFileSync(__dirname + '/certs/server-key.pem'),
|
||||
cert: fs.readFileSync(__dirname + '/certs/server-cert.pem')
|
||||
}, app).listen(port, () => {
|
||||
let options = {};
|
||||
if(!useHttp) {
|
||||
options.key = fs.readFileSync(__dirname + '/certs/server-key.pem');
|
||||
options.cert = s.readFileSync(__dirname + '/certs/server-cert.pem');
|
||||
}
|
||||
|
||||
server.createServer(options, app).listen(port, () => {
|
||||
console.log('Listening port:', port, 'folder:', publicFolderName);
|
||||
});
|
||||
});
|
||||
|
@ -8,11 +8,11 @@ import Modes from "./modes";
|
||||
|
||||
export const DEBUG = process.env.NODE_ENV !== 'production' || Modes.debug;
|
||||
const ctx: any = typeof(window) !== 'undefined' ? window : self;
|
||||
export const MOUNT_CLASS_TO: any = DEBUG/* && false */ ? ctx : {};
|
||||
export const MOUNT_CLASS_TO: any = DEBUG || true/* && false */ ? ctx : {};
|
||||
export default DEBUG;
|
||||
|
||||
//let m = DEBUG;
|
||||
if(!DEBUG/* || true */) {
|
||||
/* if(!DEBUG) {
|
||||
ctx.sandpitTurtle = () => {
|
||||
//if(!m) {
|
||||
for(let i in MOUNT_CLASS_TO) {
|
||||
@ -23,7 +23,7 @@ if(!DEBUG/* || true */) {
|
||||
|
||||
//DEBUG = !DEBUG;
|
||||
};
|
||||
}
|
||||
} */
|
||||
|
||||
/* export const superDebug = (object: any, key: string) => {
|
||||
var d = object[key];
|
||||
|
@ -15,6 +15,8 @@ const buildDir = __dirname + '/public/';
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
|
||||
devtool: 'source-map',
|
||||
|
||||
optimization: {
|
||||
//minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})],
|
||||
//runtimeChunk: 'single',
|
||||
|
Loading…
x
Reference in New Issue
Block a user