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

Replace webpack-dev-middleware with our own improved version.

This commit is contained in:
Simo Kinnunen 2014-04-21 17:38:34 +09:00
parent 1e18c991b4
commit c9043dd895
3 changed files with 115 additions and 19 deletions

View file

@ -45,6 +45,13 @@ module.exports = function(options) {
io.set('browser client', false)
io.set('transports', ['websocket'])
if (!options.disableWatch) {
app.use('/static/build', webpack({
debug: true
, devtool: 'eval'
}))
}
app.use('/static/bower_components',
express.static(pathutil.resource('bower_components')))
app.use('/static/data', express.static(pathutil.resource('data')))
@ -54,10 +61,6 @@ module.exports = function(options) {
app.use(express.favicon(pathutil.resource(
'bower_components/stf-graphics/logo/exports/STF-128.png')))
if (!options.disableWatch) {
app.use(webpack)
}
app.use(express.cookieParser(options.secret))
app.use(express.cookieSession({
key: options.ssid