This commit is contained in:
George Saines 2014-03-04 10:24:23 -08:00
commit 3ea4439fc1
2 changed files with 7 additions and 3 deletions

View file

@ -207,7 +207,12 @@ module.exports = class Simulator
transpileSpell: (thang, spellKey, methodName) -> transpileSpell: (thang, spellKey, methodName) ->
slugifiedThangID = _.string.slugify thang.id slugifiedThangID = _.string.slugify thang.id
source = @currentUserCodeMap[[slugifiedThangID,methodName].join '/'] ? "" source = @currentUserCodeMap[[slugifiedThangID,methodName].join '/'] ? ""
@spells[spellKey].thangs[thang.id].aether.transpile source aether = @spells[spellKey].thangs[thang.id].aether
try
aether.transpile source
catch e
console.log "Couldn't transpile #{spellKey}:\n#{source}\n", e
aether.transpile ''
createAether: (methodName, method) -> createAether: (methodName, method) ->
aetherOptions = aetherOptions =

View file

@ -47,8 +47,7 @@ setupExpressMiddleware = (app) ->
app.use(express.bodyParser()) app.use(express.bodyParser())
app.use(express.methodOverride()) app.use(express.methodOverride())
app.use(express.cookieSession({secret:'defenestrate'})) app.use(express.cookieSession({secret:'defenestrate'}))
if config.isProduction #app.use(express.compress()) if config.isProduction # just let Cloudflare do it
app.use(express.compress())
setupPassportMiddleware = (app) -> setupPassportMiddleware = (app) ->
app.use(authentication.initialize()) app.use(authentication.initialize())