This project contains the web client for Measurement Lab visualizations.
npm installWe 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-dllThis 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 devStart the web server:
npm run start-devStart webpack watch:
npm run webpack-watchWe are using HardSourceWebpackPlugin. If your webpack build is operating strangely, be sure to run a
npm run webpack-clean-cacheThis 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-dashboardAnd in the other, run the web server with:
npm run start-devNote that the dashboard adds roughly 500ms to the webpack rebuild time.
npm testnpm run buildnpm run startThe site is currently configured to deploy to http://viz.measurementlab.net. To do so, run:
npm run deployOriginally built from https://github.com/erikras/react-redux-universal-hot-example