The funny thing is we noticed as we did this that we don’t even need Express.js anymore at this point. We do need a simple HTTP server running just to interface with Amazon Web Services, and for performing a few development administrative tasks (like manually clearing the database and creating tables), but the actual work is done with just websockets. So we refactored our back end by removing Express.js and replacing it with just the websocket server code, using that “ws” Node.js library. Less is more is our opinion. I joked that I like removing code more than I like making code, and I think that philosophy holds merit.
Our next steps are to identify any other information we want to log last minute before we send this prototype off to Engineering.com, and also to investigate using encryption (using WebSocket Secure aka wss:// instead of WebSocket aka ws://) to make our app more robust once it hits production.