updated express to v4 and mongojs

This commit is contained in:
mserranom 2020-03-26 15:17:07 +01:00
parent 6f398625a3
commit 2f3d664db0
3 changed files with 1088 additions and 447 deletions

View file

@ -12,6 +12,9 @@ const logger = require('logger-sharelatex')
logger.initialize('notifications-sharelatex')
const express = require('express')
const app = express()
const methodOverride = require('method-override')
const bodyParser = require('body-parser')
const errorHandler = require('errorhandler')
const controller = require('./app/js/NotificationsController')
const mongojs = require('mongojs')
const db = mongojs(Settings.mongo.url, ['notifications'])
@ -21,12 +24,10 @@ metrics.memory.monitor(logger)
const HealthCheckController = require('./app/js/HealthCheckController')
app.configure(function() {
app.use(express.methodOverride())
app.use(express.bodyParser())
app.use(methodOverride())
app.use(bodyParser())
app.use(metrics.http.monitor(logger))
return app.use(express.errorHandler())
})
app.use(errorHandler())
metrics.injectMetricsRoute(app)

File diff suppressed because it is too large Load diff

View file

@ -18,11 +18,14 @@
"license": "ISC",
"dependencies": {
"async": "^2.6.3",
"body-parser": "^1.19.0",
"coffee-script": "^1.12.7",
"express": "3.1.0",
"errorhandler": "^1.5.1",
"express": "4.17.1",
"logger-sharelatex": "^1.9.1",
"method-override": "^3.0.0",
"metrics-sharelatex": "^2.6.2",
"mongojs": "^2.4.0",
"mongojs": "^3.1.0",
"node-statsd": "0.1.1",
"request": "^2.88.2",
"settings-sharelatex": "^1.1.0",