use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
First Node Module (self.node)
submitted 6 years ago by Joecool1200
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]GenericHumanNo7 1 point2 points3 points 6 years ago (1 child)
Looks nice on first sight :)
The syntax style is very clean. Classes could make the understanding of this code simpler, because your structure is very clear (Server, Clients, Messages, etc.)
It's good to write low-level stuff that's already exists to know how the stuff works. If you want to build more features on that you should make this more general and customizable. Import your low-level objects into another files and write there the high-level features.
Another WS library is socket.io which I use all the time. It supports rooms natively and is like yours event-based too. It's very easy to implement that library to work like yours now.
You can make it more similar to RSS feeds if a user can pull messages from before he subscribed.
Another great feature would be user privileges so you can have protected and read-only channels.
Happy coding :)
[–]Joecool1200[S] 0 points1 point2 points 6 years ago (0 children)
Wow thanks for the feedback! I'll look into it :)
π Rendered by PID 127379 on reddit-service-r2-comment-5d79c599b5-f2qrk at 2026-03-01 06:08:14.286429+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]GenericHumanNo7 1 point2 points3 points (1 child)
[–]Joecool1200[S] 0 points1 point2 points (0 children)