mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 02:05:22 -05:00
9e28ceb9db
There is an environment variable LOG_LEVEL to set it.
24 lines
No EOL
609 B
CoffeeScript
24 lines
No EOL
609 B
CoffeeScript
app = require('../../../../app')
|
|
require("logger-sharelatex")
|
|
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() |