This website is built off of the Express and Socket.io libraries and runs on Node.js
Move into the directory using cd
cd ./Your/Directory/Here
Install all the dependencies using node
node install
Use the package manager npm to install express
While in the same directory:
start it using node
node .
The code above will start the index.js file and run the code on port 80
I have commented each line of code for ease of understanding. When you need to know what a certain line does you can look to the right of it for something like this.
io.on('connection', (socket) => {
var address = socket.handshake.address; // this is where you will see my comments!
...
};
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
If you think my comments are trash and don't explain the code well please consider making a pull request so this repo can do it's job better!
This is merely an example of a website with basic Socket.io integration with a Express website so please don't add anything advanced and complicated.
This repo uses the MIT license because everyone loves open source!
Credit goes to @DeadTheAmazing for all the code written.