Skip to content

Backend server code for a simple chat application using HTTP long polling instead of Websockets. Written in Nodejs using ExpressJS.

License

Notifications You must be signed in to change notification settings

shivamshekhar/chat-app-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chat-app-backend

Version 3.0.0

Description

Backend server code for a simple chat application using HTTP long polling instead of Websockets. Written in Nodejs using ExpressJS.
(Please note, this is the server repo, for frontend client, visit : chat-app-frontend)

Prerequisites

Getting Started

  • Clone Repository and checkout
git clone https://github.com/shivamshekhar/chat-app-backend && cd chat-app-backend
  • Install Gulp CLI
sudo npm i -g gulp
  • Install modules
npm i
  • Run Db migrations
sudo mysql -u root -p < ./scripts/mysql/db.sql
  • Run app
npm run start
  • Verify that app is running successfully by visiting following url in browser
http://localhost:4000/test

If app is running successfully, you'll see following message

{
    message : "App is running successfully"
}

Scope of improvement

Short Term

  • Made a frontend web client for this server.
  • Implement more functionality like adding a friend/contact, etc.
  • Improve the auth and session token logic and make it more secure.
  • Improve long polling logic to make it work in cluster mode.

Long Term

  • Make an android client.
  • Reformat the code, and use Typescript instead of NodeJS.
  • Introduce clustering to run multiple processes.

Author

Shivam Shekhar
[email protected]

About

Backend server code for a simple chat application using HTTP long polling instead of Websockets. Written in Nodejs using ExpressJS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published