A one-line syntax error stopped the game server on a chess site I built from starting. My deploy check missed it.
I built abcchess.org during an internship, and I still maintain it. People play, solve puzzles, take lessons, and coaches run real classes on it. The first commit was Create Next App, in January. Most of my commits since then start with "fix".
Why live games cannot live on serverless
Most of the site is a request and a response. You ask for a puzzle, the server answers. That side is a Next.js app on Vercel, with data in DynamoDB. Login started on Firebase and moved to Auth.js in September.
Live games are different. Two players share one board and a clock, and something has to keep that clock running for the whole game. A Vercel function only lives for a few seconds, so it is the wrong place for that work.
What went wrong
The game server would not start at all. I had mixed two operators in one line of JavaScript without parentheses. That is a syntax error, and Node refused to run the file.…