Skip to content

code4policy/client_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Client-Server Demo

A simple demonstration of client-server architecture where one computer becomes a web server that others can access.

For Server (Presenter)

  1. Clone this repository:
git clone https://github.com/code4policy/client_server.git
cd client_server
  1. Install serve:
npm install -g serve
  1. Start your computer as a web server:
serve

This command turns your computer into a web server that:

  • Serves the index.html file in this repository
  • Listens for incoming connections on port 3000
  • Can be accessed by other computers on your network

For Clients (Students)

  1. Get the server's IP address from the presenter
  2. Open your web browser
  3. Navigate to: http://PRESENTER_IP:3000 You are now making a request to your classmate's computer!

NOTE: Make sure to be on the same wifi

Common Issues

  1. Can't connect to server:
    • Verify you're on the same network
    • Check if firewall is blocking connections
    • Confirm IP address and port

Network Requirements

  • All participants must be on the same local network
  • Some corporate/university networks may block peer-to-peer connections
  • Public WiFi might restrict device-to-device communication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages