Skip to content

hariprasad0029/simple-chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Simple Chat app built using ChatGPT

Prompt used: Please write a simple chat app using Node.js and Socket.io

Basic Setup

Express.js for server, Socket.io for realtime communication, and plain HTML, CSS, JavaScript for frontend.

# Clone the git repo and cd into it
npm install # installs the dependencies
node server.js # starts the server

Code Cleanup

ChatGPT puts everything together in a single file. We need to separate the code into different files. We will use the following structure:

  1. Split index.html into 3 files, index.html, style.css, and script.js.
  2. Crate a public folder and put all these files there.
  3. In server.js, use express.static module for /public folder. (Line number 10)

Emoji search

Replace the following words with emojis:

{
  "react": "โš›๏ธ",
  "woah": "๐Ÿ˜ฎ",
  "hey": "๐Ÿ‘‹",
  "lol": "๐Ÿ˜‚",
  "like": "โค๏ธ",
  "congratulations": "๐ŸŽ‰"
}

About

A simple chat build using node.js and socket.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published