Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.05 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.05 KB

Deploy

React Sync Demo

This is a modified version of the React comment box example from the React tutorial. The example app has been modified to demonstrate syncing updates and offline activity across devices.

Demo GIF

To use

Start the server with:

npm install
node server.js

And visit http://localhost:3000/. Try opening multiple tabs!

You can change the port number by setting the $PORT environment variable before invoking the script, e.g.,

PORT=3001 node server.js

Development

Primus is set to create a new public/scripts/primus.js file when the server starts. If you're using nodemon to restart on file changes:

nodemon --ignore public --ignore comments.json

Webpack config in webpack.config.js runs DefinePlugin to set NODE_ENV to production, and UglifyJS to minify files. Comment out the plugins, then run webpack:

webpack ---watch