Book Image

Getting Started with Meteor.js JavaScript Framework

By : Isaac Strack
Book Image

Getting Started with Meteor.js JavaScript Framework

By: Isaac Strack

Overview of this book

Table of Contents (14 chapters)

Multiple clients


Good things should be shared. Meteor gets this, and as we're about to see for ourselves, the reactive programming model allows us to share updates in real time across multiple clients.

With your Chrome web page still open to http://localhost:3000/, open a new browser tab and navigate to the same page.

Tip

If you really want to get fancy, you can conduct this same experiment with multiple browsers (Firefox, Opera, or Safari). Each session will be live and reactive!

You now have two clients open, which is simulating the application being open by different people, at different locations, with different computers. Meteor's reactive model allows you to treat all clients in the same manner, and a change made by one will be propagated to all the others.

With your eyes on the new second browser, type the following command into the console of browser #1:

> lists.insert({Category:"Vinyl Records"})

You will notice that the change propagates to both browsers, without a page refresh:

Feel...