Coder Social home page Coder Social logo

socket-io-cordova's Introduction

Socket-IO-Cordova

Simple Socket IO+cordova program for web and mobile

Nodejs

Nodejs is a server side javascript platform on Chrome's JavaScript runtime. 

Advantages	
----------
Event-Driven
Non-blocking I/O
Light Weight Because of Javascript

For further Details and installation Guide visit : http://nodejs.org/

Cordova

Apache Cordova is a platform for building mobile applications without the knowledge of native code.

Advantages	
----------
Multi-platform Mobile application Development with HTML5, Javascript, CSS.
apache cordova engine takes care of native code.
Easy for web developers to create a mobile application without native code knowledge

For Further Details visit : http://cordova.apache.org/

Installing Cordova in Nodejs and creating project visit : http://docs.phonegap.com/en/3.5.0/guide_cli_index.md.html#The%20Command-Line%20Interface

Simple Socket IO+cordova program for web and mobile

Install 'Socket.io' module and 'express' module using npm as

C:\>npm install socket.io
C:\>npm install express

Create New Project in cordova using command line

C:\> cordova create chat com.chat.app Chat

The above command create a simple cordova project with folder structures as follows Chat | |--->hooks |--->platforms |--->plugins |--->www |--->config | The WWW is the root folder where we are going to spend our development Time

copy the directory www from repository and replace that with your www folder

NOTE : For who are not familiar with nodejs you have to copy your node modules socket.io and express to WWW/js/node_modules
		and who have to start your nodeserver using following command
		C:\chat\www\js>node nodeserver.js
		
nodeclient.js
-------------
Change your IP address as follow in nodeclient.js file
var socket = io.connect( 'http://IPAddress:1034' );
This IPAddress shouldn't be localhost give your Valid IP address if you are using mobile broadband 
check your public ip using http://whatismyip.com/ and pass that IP

socket-io-cordova's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

vimosd

socket-io-cordova's Issues

Uncaught ReferenceError: io is not defined at nodeClient.js:2

cordova with browser socketio is working fine. but when i use the emulator i got this errors
socket.io.js Failed to load resource: net::ERR_FILE_NOT_FOUND
nodeClient.js:2 Uncaught ReferenceError: io is not defined
at nodeClient.js:2

in emulator how the socket.io js is taken ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.