mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 08:13:44 -05:00
0a0722a8f8
GitOrigin-RevId: 9717a14d34a662c9740aa50446d0699c6afd3222
21 lines
531 B
JavaScript
21 lines
531 B
JavaScript
const metrics = require('@overleaf/metrics')
|
|
metrics.initialize('chat')
|
|
const logger = require('@overleaf/logger')
|
|
logger.initialize('chat')
|
|
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,
|
|
}
|