How to use Google Channel API

Hi , I am trying to implement Google Channel API for a chat module in my Ionic App. I am having trouble using its javascript client library in my Ionic. Can anyone guide me how to implement it. Is it possible to use Google Channel API in a application not hosted on Google App Engine. My ionic app uses a REST Backend deployed on GAE and so we need to save chat messages in the Google Datastore.