Skip to content

Commit

Permalink
refactor(app-factory): export app express instance too
Browse files Browse the repository at this point in the history
fix #141
  • Loading branch information
christian-hawk committed Nov 16, 2020
1 parent 0330785 commit 6eb4e2d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/app-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const routes = require('./routes')
const metricsMiddleware = require('../server/utils/metrics')
const csurf = require('csurf')

class App {
class AppFactory {
createApp () {
app.use(metricsMiddleware)
app.use(morgan('short', { stream: logger.logger.stream }))
Expand Down Expand Up @@ -55,4 +55,7 @@ class App {
}
}

module.exports = App
module.exports = {
AppFactory: AppFactory,
app: app
}

0 comments on commit 6eb4e2d

Please sign in to comment.