Skip to content

Instantly share code, notes, and snippets.

@rjmacarthy
Created February 17, 2016 14:03
Show Gist options
  • Save rjmacarthy/4f900de3aa33323c02be to your computer and use it in GitHub Desktop.
Save rjmacarthy/4f900de3aa33323c02be to your computer and use it in GitHub Desktop.
Webpack frontend / backend

Backend reload

forever --watch --watchDirectory="./server/" server/app.js

Front end reload

webpack-dev-server --hot --inline --history-api-fallback

Webpack config with proxy for backend.

devServer: {
  host: 'localhost',
  port: 8080,
  contentBase: __dirname + '/public/',
  proxy: {
    '/api/*' : 'http://localhost:3000',
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment