overleaf/services/chat/app/js/server.js

20 lines
504 B
JavaScript
Raw Normal View History

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')
2019-02-05 13:50:57 -05:00
logger.initialize('chat')
export const app = express()
export const server = http.createServer(app)
2014-08-15 05:50:36 -04:00
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true }))
app.use(metrics.http.monitor(logger))
metrics.injectMetricsRoute(app)
2014-08-15 05:50:36 -04:00
Router.route(app)