- Step 1: click this =>
- Step 2: Enable CORS on the Cloudant Instance
- Step 3: Change permissions on photos_db database (read, write, replicate)
$ git clone https://github.com/csantanapr/ionic-chat
$ cd ionic-chat
$ npm install
- Set the hostname of WebSocket server for Ionic App to connect.
- Edit
www/js/app.js
, change from http://ionic.mybluemix.net to your local ip or remote host on Bluemix after deploying app. - Edit
www/js/app.js
, change DBUrl with your own couchdb/cloudant DB - Run
$ ionic prepare
after making the change
- Edit
$ ionic platform add ios
$ ionic platform add android
$ ionic run android
$ open platforms/ios/*.xcodeproj
$ npm start
$ open http://localhost:8080
$ cd simple_websocket
$ npm install
$ npm start
open browser on http://localhost:6001
$ cd simple_socketio
$ npm install
$ npm start
open browser on http://localhost:6001
- Minimum
- Bluemix Free Account
- Mobile or Desktop Browser with WebSockets support (http://caniuse.com/#feat=websockets)
- To run local Server
- NodeJS: Install via nvm or nodejs.org
- To run on Mobile Simulator or Device
- Install Ionic and Cordova CLI
- npm install -g ionic cordova (you might need to use sudo)
- Android
- Java SDK (setup PATH, test javac on terminal)
- Android SDK (setup PATH, test android and adb on terminal)
- XCode and XCode Commad Tools (test xcode-select -p and xcodebuild)
- Install Ionic and Cordova CLI