This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var lodash = require("lodash"); | |
function $localizeAll(name) { | |
return `eval("var " + Object.getOwnPropertyNames(${name}).reduce((code, prop)=>{ | |
if (/^[a-zA-Z$_][a-zA-Z$_0-9]*$/.test(prop)) { | |
return code.concat(\`\${prop} = ${name}["\${prop}"]\n\`); | |
} else { | |
console.warn("did not import '" + prop + "'"); | |
return code; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var session = require('express-session'); | |
var MySQLStore = require('express-mysql-session')(session); | |
var helmet = require('helmet'); | |
var lusca = require('lusca'); |