Giter Site home page Giter Site logo

udattam / conversations Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 605 KB

A realtime chat application built with Node.js, Express and Socket.io.

Home Page: https://conversations.onrender.com/

JavaScript 35.07% HTML 33.80% CSS 31.13%
css express html javascript nodejs socket-io

conversations's Introduction

Conversations

A realtime chat application built with Node.js, Express and Socket.io.

Table of Contents

Overview

Conversations is a realtime chat application built with Websockets. It is made using Node.js, Express and Socket.io. It allows users to join a chatroom and send messages to other users in the chatroom.

Features

  • Realtime chat
  • Typing indicator
  • Usernames
  • Messages with sender and timestamps information
  • Different colors for sender and receiver messages
  • Scroll to bottom of chat when new message is sent

Technologies

  • Node.js
  • Express
  • Socket.io
  • HTML
  • CSS
  • JavaScript
  • Google Fonts

Setup

The structure of the project is as follows:

Conversations
├── public
├── app.js
├── package.json
├── package-lock.json

First,navigate to the project directory with the following command:

cd Conversations

To run this project, you will need to have Node.js installed on your computer. You can download it from here. Install the dependencies with the following command:

npm install

To start the server, run the following command:

npm run start

If you want to run the server in development mode, run the following command:

npm run dev

The development mode uses nodemon to watch for changes in the code and restart the server automatically.

Closing Notes

  • The entry point of the application is app.js.
  • The public folder contains the HTML and CSS files. The package.json file contains the dependencies of the project.
  • The app.js file contains the main logic of the application.
  • There is a main.js inside the public folder which contains the client side logic of the application.
  • With socket.io, we can emit and listen to events. The events are used to send and receive messages. The messages are sent to the server and then broadcasted to all the users in the chatroom.

Usage

Open multiple tabs in your browser and navigate to localhost:4000. Enter your desired username (by default, the username is anonymous). Send messages to other users in the chatroom. You can also see the typing indicator when other users are typing. Alternatively, visit this website to try it out!

Images

Default Home Page: Default page Typing Indicator: Typing indicator Chatroom: Chat page

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


Link to the project : Github Repository

conversations's People

Contributors

udattam avatar

Watchers

 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.