Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

j-toscani/king-pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KingPong

Play a classic against your friends. Online! On mobile and Desktop!

Usage

In order to install all dependencies use the following commands:

npm install
cd client
npm install

In order for the game to work, you have to make the following adjustments:

  1. open the file "socket-server.js" and choose a port you want the socket to run on.
  2. Go to the folder "pages" and open the "Main.js" file and look for the following line of code:
...
React.useEffect(() => {
const socket = io();
socket.emit("setname", getItem("nickname"));
...
  1. Add "http://127.0.0.1:" as an argument to the ìo() function. has to be the same port your server listens to.

For developement you can start the server and client at the same time by using the following command:

npm run dev

The game can be viewed here: https://king-pong-nf.herokuapp.com/;

About

Braekout/Pong game made with React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published