This project contains the web client for Measurement Lab visualizations.
npm install
We are using webpack's DllPlugin, so we need to build our DLL vendor package before running our standard webpack watch. To do so, run this once:
npm run webpack-dll
This puts all the vendor files in their own bundle so we don't need to scan them when rebuilding our files during development.
If you see this error:
Error: Cannot find module '.../mlab-vis-client/static/dist/vendor-manifest.json'
You need to run npm run webpack-dll
.
Now to start the dev server, there are two options:
npm run dev
Start the web server:
npm run start-dev
Start webpack watch:
npm run webpack-watch
We are using HardSourceWebpackPlugin. If your webpack build is operating strangely, be sure to run a
npm run webpack-clean-cache
This plugin dramatically speeds up build times, but does require you to clean the cache occasionally (when problems arise).
If you see an error in your console similar to:
Uncaught TypeError: __webpack_require__(...) is not a function
Chances are you need to clean the cache. Run the command as described above.
If you prefer to have webpack rendered in a dashboard, use two separate terminal windows. In one, run webpack with:
npm run webpack-dashboard
And in the other, run the web server with:
npm run start-dev
Note that the dashboard adds roughly 500ms to the webpack rebuild time.
npm test
npm run build
npm run start
The site is currently configured to deploy to http://viz.measurementlab.net. To do so, run:
npm run deploy
Originally built from https://github.com/erikras/react-redux-universal-hot-example