This is a very basic sample app to get you started using Webpack 2, Express and is setup to deploy to Heroku.
Features:
Note: this does not use React, Angular, or any other front-end framework. Pick your own when you're ready.
npm i
npm start
- Visit http://localhost:3000/
First, you'll need a heroku account.
- In Heroku, create a new app.
- Add a new buildpack, select
heroku/nodejs
. This should set you up to automatically runnpm install
which is what you'll need to get up and running. - Follow the instructions to link to your repository.
git push heroku master
- Assuming you've set everything up correctly, this will deploy your app, and run the postinstall script inpackage.json
.
Thanks to christianalfoni for the excellent Webpack 1 tutorial and example repo. I got started there and then built this one once I realized I wanted to play with Webpack v2.
The Heroku
part of this is really easy to change for your own build process. Dig into the npm scripts, and take a look at the production webpack config.