Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes

Real time Tic Tac Toe game in Javascript using Socket.IO

Server-side code Looks pretty good! However, as discussed in the comments, your server should probably be checking the game state to curtail cheating. As it is, it's pretty easy to "win" by fiddling ...
Flambino's user avatar
  • 33k
6 votes

Node websockets

In node, throwing an error without catching it will kill the process. This seems to be the primary error handling mode (and based on this it seems you then rely on pm2 to restart the process). This ...
George's user avatar
  • 311
3 votes

NodeJS/Express/ backend

A short review; Your database related functions should be separated, in my mind your socket methods should only do this: Normalize parameters your receive like with ...
konijn's user avatar
  • 33.2k
2 votes

Basic chat server and client using WebSocket

In regards to the TODO comment, I would suggest something like this: ...
jmhage's user avatar
  • 86
2 votes

An Express route, which renders a page, and makes use of

Conditional line not in brackets There is an if statement in queryAPI() without brackets. This impacts readability greatly- ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
2 votes

An Express route, which renders a page, and makes use of

Linting The code reads well. There is one convention you missed: use \s to indicate whitespace. ...
dfhwze's user avatar
  • 13.9k
2 votes

Await socket Response

You have a few flags (removed, responded) which are almost equivalent and possibly useless. ...
Adriano Repetti's user avatar
1 vote

9X9 Tic Tac Toe variant with frontend in react and backend in python flask_socketio

I'm not fantastic with Typescript; so let's take a look at your Python: Credentials app.config['SECRET_KEY'] = 'secret!' This shouldn't be baked into your code. ...
Reinderien's user avatar
  • 62.1k
1 vote Node.js Object Oriented Code Structure Approach

Good comments from @Magnus Jeffs Tovslid that I would like to add to. It seems like you have at least three logical layers to the user experience. First, you have what you call the ...
Mike Brant's user avatar
  • 9,608
1 vote Node.js Object Oriented Code Structure Approach

Just a few comments: 1: The Room class can quickly become a place to throw in all sorts of functionality, even when it's not needed by all its children. I would be careful to not put much there at ...
Magnus Jeffs Tovslid's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible