Skip to content

Measurement Lab Visualizations - Analyzing internet speeds worldwide.

License

Notifications You must be signed in to change notification settings

opentechinstitute/mlab-vis-client

 
 

Repository files navigation

MLab Visualizations

Build Status

This project contains the web client for Measurement Lab visualizations.

Installation

npm install

Development Server

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:

Web Server + Webpack Watch in one command

npm run dev

Web Server separate from Webpack Watch

Start the web server:

npm run start-dev

Start webpack watch:

npm run webpack-watch

Caching with HardSourceWebpackPlugin

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.

Using webpack-dashboard

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.

Testing

npm test

Building for Production

npm run build

Production Server

npm run start

Deploying

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

About

Measurement Lab Visualizations - Analyzing internet speeds worldwide.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.3%
  • CSS 20.7%