mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 05:41:57 +00:00
Merge branch 'ja-track-changes'
This commit is contained in:
commit
98f0bb5e19
2 changed files with 12 additions and 14 deletions
|
@ -12,7 +12,6 @@ metrics.mongodb.monitor(Path.resolve(__dirname + "/../../node_modules/mongojs/no
|
|||
|
||||
app.use express.bodyParser()
|
||||
app.use metrics.http.monitor(logger)
|
||||
Router.route(app)
|
||||
|
||||
if (app.get 'env') == 'development'
|
||||
console.log "Development Enviroment"
|
||||
|
@ -22,19 +21,17 @@ if (app.get 'env') == 'production'
|
|||
console.log "Production Enviroment"
|
||||
app.use express.logger()
|
||||
app.use express.errorHandler()
|
||||
|
||||
profiler = require "v8-profiler"
|
||||
app.get "/profile", (req, res) ->
|
||||
time = parseInt(req.query.time || "1000")
|
||||
profiler.startProfiling("test")
|
||||
setTimeout () ->
|
||||
profile = profiler.stopProfiling("test")
|
||||
res.json(profile)
|
||||
, time
|
||||
|
||||
|
||||
|
||||
mountPoint = "/chat"
|
||||
app.use (req, res, next) ->
|
||||
|
||||
if req.url.slice(0, mountPoint.length) == mountPoint
|
||||
req.url = req.url.slice(mountPoint.length)
|
||||
next()
|
||||
else
|
||||
res.send(404)
|
||||
|
||||
app.use(express.static(__dirname + "/../../public/build"))
|
||||
Router.route(app)
|
||||
|
||||
module.exports = {
|
||||
server: server
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
"mongojs": "^2.4.0",
|
||||
"redis": "~0.10.1",
|
||||
"request": "^2.79.0",
|
||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0"
|
||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
||||
"v8-profiler": "^5.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunyan": "^1.0.0",
|
||||
|
|
Loading…
Reference in a new issue