Skip to content

ramax495/simple_chat_applcation

 
 

Repository files navigation

Introduction

This is a simple chat application developed using ionic

Refer below article for detail guidance (Recomended),
https://medium.com/@shamique/simple-chat-application-using-ionic-and-socket-io-82d9b4605cc3

Pre-requisite

  • NodeJs & ionic 2 installed in the machine

How to run ?

Chat Server

  • Create a directory for chat server and go to that folder
  • run npm init and initiate a new NodeJs project
  • Install socket.io: npm install socket.io --save
  • Create filename as server.js and add below code in it
  • var socket = require('socket.io'), http = require('http'),
    server = http.createServer(), socket = socket.listen(server);
    
    	socket.on('connection', function(connection) {
    		console.log('User Connected');
    
    		 connection.on('message', function(msg){
    			 socket.emit('message', msg);
    		 });
    	});
    
    	server.listen(3000, function(){
    		console.log('Server started');
    	});
    
  • Run the chat server: node server.js

Chat Client

  • Clone the repo to your machine
  • Go to the project folder and run npm install
  • run the project, ionic serve

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 40.4%
  • TypeScript 28.3%
  • HTML 23.6%
  • JavaScript 7.7%