1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

Move webpack-config.js to the middleware folder.

This commit is contained in:
Simo Kinnunen 2014-02-25 14:13:20 +09:00
parent 13361c5264
commit f24e777961
2 changed files with 3 additions and 4 deletions

View file

@ -48,7 +48,7 @@ var webpackOptions = {
]
}
module.exports.middleware = webpackMiddleware(webpack(webpackOptions), {
module.exports = webpackMiddleware(webpack(webpackOptions), {
noInfo: false,
quiet: false,
lazy: false,
@ -57,5 +57,3 @@ module.exports.middleware = webpackMiddleware(webpack(webpackOptions), {
colors: true
}
})
module.exports.options = webpackOptions

View file

@ -18,6 +18,7 @@ var wirerouter = require('../wire/router')
var dbapi = require('../db/api')
var auth = require('../middleware/auth')
var webpack = require('../middleware/webpack')
module.exports = function(options) {
var log = logger.createLogger('app')
@ -39,7 +40,7 @@ module.exports = function(options) {
app.use('/static', express.static(pathutil.resource('app')))
if (!options.disableWatch) {
app.use(require('./webpack-config').middleware)
app.use(webpack)
}
app.use(express.cookieParser(options.secret))