One cool thing about having a central server-side location to emit events from using Socket.IO is that you can use it as an API for multiple applications.
In this recipe, we will emit events to the server every time a user taps on a button on our app. The server will then emit the tap data to the client side, where it will be displayed on an analytics page.
This technique can be useful for gathering analytics data in real time, and watching the results of A/B testing as they happen.
To respond to tap events from the device by updating the counts on our analytics page, follow these steps:
cordova create app com.client.tapsclientTaps.