Giter Club home page Giter Club logo

nodejs-chat-application's Introduction

Chat App created using NodeJS and Socket.IO and hosting on Azure

This is a tutorial on how to setup a basic chat app using NodeJS and Socket.IO and deploying and hosting it successfully on Azure.

This basic app is a sample for a group chat which can have multiple participants and offers a place where these participants can chat.

The app is hosted on Azure at

http://nodegroupchat.azurewebsites.net/

This repository can be used for learning purpose the same way i did.

If you have any query regarding this repository, I would be happy to reply back. You can connect with me on LinkedIn

Getting Started

The following technologies are used:

  • Visual Studio Code (Code Editor of choice)
  • NodeJS
  • Socket.io

Installation Guide

This installation guide is for Windows. But Mac and Linux can follow too for basic installation.

  • Install Visual studio code or any code editor of choice.(The reason of choosing VS code is because of it's integration with Azure)
  • Install NodeJS (install the LTS version for nodejs)

Folder Structure for the application

  • /root
    • public (contains all html, css and javascript code)
    • index.js (contains the server-side code)

Setting up the app

Once you have successfully installed NodeJS. To create the index.js, we are going to use the command

npm init

You can either select the default values or enter your add your own if you want to change.

Now, index.js will be created. Create a folder named public and create three files namely index.html, main.js and style.css

To install socket.io, run the command

npm install socket.io

You can also fork this repo and clone it to your pc locally. If you clone this repository, run this command to install the necessary dependencies.

npm install

Runthe server locally

Go to the /src folder for this application and run this command.

node index.js

Your app url is hosted on localhost:3000. Go to your browser of choice and go to the app url.

Enjoy chatting with your friends on your local devices by opening multiple browsers.

Steps to deploy this app to Azure

Firstly, install Azure App Serive

  • Follow these steps to deploy the app to Azure.

  • Follow the steps mentioned above to successfully create a CI/CD pipeline and deploy the app azure.

Note: The reason for attaching the steps guides is for easy understanding with Microsoft docs and it is maintained by Microsoft making it more trustable.

Author

  • This guide is created by Avichel Verma
  • Main credits goes to Socket.io and Microsoft docs for their exceptionally guides.

nodejs-chat-application's People

Contributors

avichelverma 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.