overleaf/services/track-changes/test/acceptance/coffee/helpers/TrackChangesApp.coffee
Henry Oswald fca95b5b27 dockerise app
- 1.1.3 build scripts
- add env vars for configuring s3
- add docker file
2018-05-24 12:02:27 +01:00

24 lines
No EOL
630 B
CoffeeScript

app = require('../../../../app')
require("logger-sharelatex").logger.level("info")
logger = require("logger-sharelatex")
Settings = require("settings-sharelatex")
module.exports =
running: false
initing: false
callbacks: []
ensureRunning: (callback = (error) ->) ->
if @running
return callback()
else if @initing
@callbacks.push callback
else
@initing = true
@callbacks.push callback
app.listen Settings.internal?.trackchanges?.port, "localhost", (error) =>
throw error if error?
@running = true
logger.log("track changes running in dev mode")
for callback in @callbacks
callback()