mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
9e24affe7a
[misc] drop errorhandler middleware GitOrigin-RevId: e95628b6ba5808e4bf4c1df291b6d9eb91d9bc10
32 lines
896 B
JavaScript
32 lines
896 B
JavaScript
/* eslint-disable
|
|
no-unused-vars,
|
|
*/
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
// Fix any style issues and re-enable lint.
|
|
/*
|
|
* decaffeinate suggestions:
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
*/
|
|
const metrics = require('@overleaf/metrics')
|
|
metrics.initialize('chat')
|
|
const logger = require('logger-sharelatex')
|
|
logger.initialize('chat')
|
|
const Path = require('path')
|
|
const express = require('express')
|
|
const bodyParser = require('body-parser')
|
|
const app = express()
|
|
const server = require('http').createServer(app)
|
|
const Router = require('./router')
|
|
|
|
app.use(bodyParser.json())
|
|
app.use(bodyParser.urlencoded({ extended: true }))
|
|
app.use(metrics.http.monitor(logger))
|
|
metrics.injectMetricsRoute(app)
|
|
|
|
Router.route(app)
|
|
|
|
module.exports = {
|
|
server,
|
|
app,
|
|
}
|