Skip to content

A local network basic chatapp. Users can communicate with different devices on the same Wi-fi network.

License

Notifications You must be signed in to change notification settings

codycordova/local-chatapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Chatapp

local_chatapp

Dependencies

  • http-server - Simple HTTP server for serving static files.
  • ws - WS is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation.

Installation

  1. Install dependencies:

    npm install
    

Change IP address in index.html

On line 78

Replace 'your-laptop-ip' with your actual local IPv4 address

const socket = new WebSocket('ws://your-laptop-ip:3000');

This will allow different devices on your local network to connect and communicate with each other.

Start the Server

In your CLI run:

node server.js

The selected server port is 3000 feel free to change as you please

For mobile devices you typically can't access localhost so type in the IP address you used above at port 3000 like 192.168.0.0:3000

About

A local network basic chatapp. Users can communicate with different devices on the same Wi-fi network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published