overleaf/services/chat/app/js/server.js
Lucie Germain 7ed9b04c3c Merge pull request #10983 from overleaf/revert-10901-lg-openapi-chat
Revert "Migrate chat service to OpenAPI"

GitOrigin-RevId: 39bdfd98bc55f8d9d56fb18bb288749aa13f25e0
2022-12-22 09:04:56 +00:00

19 lines
504 B
JavaScript

import http from 'http'
import metrics from '@overleaf/metrics'
import logger from '@overleaf/logger'
import express from 'express'
import bodyParser from 'body-parser'
import * as Router from './router.js'
metrics.initialize('chat')
logger.initialize('chat')
export const app = express()
export const server = http.createServer(app)
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true }))
app.use(metrics.http.monitor(logger))
metrics.injectMetricsRoute(app)
Router.route(app)