Would you like to contribute to the Titanium docs? To get started, sign up for an account on the Appcelerator Wiki and sign our CLA.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Made a minor grammar change


  1. In the package.json file, add socket.io as a dependency.
  2. In the app.js, in the started event listener, load the socket.io module and pass it the server instance ( API Builder instance's server property), then make API calls to the socket.io instance.  If you assign the socket.io instance to a property of the  API Builder instance, you can access the socket.io instance with that property wherever an  API Builder instance is passed to a method.
  3. Any client-side code, such as the view templates, will need to include the socket.io.js client script.  Note that when the client connects to the socket.io server ( API Builder application), you will need to update the URL when switching between testing the project locally or when its it's published to API Runtime Services.