Git Product home page Git Product logo

real-time-chat-application's Introduction

Real Time Chat Application

This application built using Node.js, Express, Socket.io, Mongoose, RESTful Web Service.

s2

Features

  • Uses Express as the application Framework.
  • Real-time communication between a client and a server using Socket.io.
  • Uses MongoDB, Mongoose for storing messages and querying data.
  • Uses RESTful Web Service for serve different platforms
  • Installation

    Running Locally

    Make sure you have Node.js and npm install.

    1. Clone or Download the repository

      git clone https://github.com/batuhaniskr/real-time-chat-application.git
      $ cd Real-Time-Chat-Application

    2. Install Dependencies

      npm install
    3. MongoDB start for need

      mongod
      command from a different terminal.

    4. Start the Application

      node app.js

    Application runs from localhost:3000.

    How It Works

    A database called "chat_db" named is created via code. The nickname, msg, group information is also kept in the table named Messages.

    User to user, As a publication broadcast or group in the room messaging. User to user messaging:

     /w username messagetext
    the message is sent as.

    Sockets

    Having an active connection opened between the client and the server so client can send and receive data. This allows real-time communication using TCP sockets. This is made possible by Socket.io.

    The client starts by connecting to the server through a socket(maybe also assigned to a specific namespace). Once connections is successful, client and server can emit and listen to events.

    RESTful

    Using HTTP requests, we can use the respective action to trigger every of these four CRUD operations.

  • POST is used to send data to a server — Create
  • GET is used to fetch data from a server — Read
  • PUT is used to send and update data — Update
  • DELETE is used to delete data — Delete
  • real-time-chat-application's People

    Contributors

    batuhaniskr avatar

    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.