Skip to content

If you have node.js, you can run server.js and host a document using your computer as the server. Anyone connected to your router can type on the document, and it will update for everyone.

License

Notifications You must be signed in to change notification settings

WesleyMcGinn/Simple-Websocket-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Websocket Example

If you want to learn the basics of server-side programming with node.js, you have come to the right place. In instructions.md are easy-to-understand instructions that will show you how to get a simple localhost server running.

What does it do?

This websocket example shows you how to create a server that you can access from any device connected to your router. When you access it, it will send you hypertext via hypertext transfer protocol (http), which will result in a webpage. On the webpage is a large text area. When you type something into this text area, it will send a message to the server that will tell it to update the text area for everybody. This is basically a much simpler version of Google Docs - one person edits the document and it updates for everyone.

How to use:

If you want to set up your computer as a localhost server, just follow the instructions in instructions.md. If you run into any problems or errors along the way, just mention it in this discussion.

Warning:

Don't put information that is too important or too valuable into the document; one small problem and the information is gone. If you even close the lid of the computer that is acting as the server, the document's info will be gone. If, however, you would like a version of this program that saves the document content to a file on the server, know that this is not a hard thing to do. I do not explain how to do that in this repository because this repository's intent is only to explain the basics of server-side programming. If you want to go further, just mention it in the enhancement discussion.

About

If you have node.js, you can run server.js and host a document using your computer as the server. Anyone connected to your router can type on the document, and it will update for everyone.

Topics

Resources

License

Stars

Watchers

Forks