Live 2 player ping-pong
You can try it out at: ping.pong.hajek.live
- React: A JavaScript library for building user interfaces
- Socket.io: Enables real-time, bidirectional communication between web clients and servers
- Express: A minimal and flexible Node.js web application framework
- Gatsby: A React-based open-source framework for creating fast static websites
-
Set Up Environment Variables
- In the
express
folder, copyexample.env
to.env
- In the
gatsby
folder, copyexample.env
to.env.development
or.env.production
- In the
-
Build the Gatsby Project
- Navigate to the
gatsby
folder. - Run
gatsby build
to create thepublic
folder. This folder will contain the static files for the Gatsby site.
- Navigate to the
-
Host the Public Folder
- Host the
public
folder on your web server of choice.
- Host the
-
Start the Express Server
- Navigate to the
express
folder. - Run
node server.js
to start the Express server.
- Navigate to the