Skip to content
Express wrapper containing webpack dev middleware and hot middleware
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.babelrc using babel to build Jun 27, 2016
.eslintrc first Sep 6, 2015
.gitignore no npm log Sep 6, 2015
.npmignore adding dummy .npmignore Jun 27, 2016
.travis.yml Update May 25, 2016
package.json using babel to build Jun 27, 2016

Build Status npm version


An express wrapper which takes in a webpack config and returns you an express app with webpack dev middleware and webpack hot middleware in the stack.

expressDev = require 'express-dev'
config = require './config/'
app = expressDev(config)

You can add your own middlewares to this app instance just as you would with a standard express instance.

An example of it in usage within an app would look like this

JS Example

import path from 'path';
import { Router } from 'express';
import expressDev from 'express-dev';
import config from './config/';

const app = expressDev(config);
app.set('views', path.join(process.cwd(), 'src', 'views'));
app.set('view engine', 'jade');

const router = new Router();
router.get('/', (req, res, next) => res.render('index'));

app.listen(3000, () => console.log('listening on port 3000'));

Coffeescript example

path = require 'path'
{Router} = require 'express' 
expressDev = require 'express-dev'
config = require './config/'

app = expressDev(config)
app.set 'views', path.join(process.cwd(), 'src', 'views')
app.set 'view engine', 'jade'

router = new Router()
router.get('/', (req, res, next) -> res.render 'index' )

app.listen(3000, -> console.log 'listening on 3000')

Now you can dev your front end code with hot module reloading if it can do it, or live reloading if it cant.

You can’t perform that action at this time.