Skip to content

DeadTheAmazing/Express_Socket.io-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express + Socket.io Website

This website is built off of the Express and Socket.io libraries and runs on Node.js

Installation

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

Starting

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

Details

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!
    ... 
};

Contributing

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.

License

This repo uses the MIT license because everyone loves open source!

Credit

Credit goes to @DeadTheAmazing for all the code written.

About

A node.js express + socket.io website example.

Resources

License

Stars

Watchers

Forks

Packages

No packages published