overleaf/services/chat/app/js/server.js
Eric Mc Sween f7275a6c4b Merge pull request #6079 from overleaf/em-upgrade-logger
Upgrade logger and metrics in all services

GitOrigin-RevId: 2baf63eeeab77fb3559cf763ddacfbf4b745cd0b
2021-12-15 09:04:25 +00:00

32 lines
895 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('@overleaf/logger')
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,
}