Looks very cool, I'll definitely be using this the next time I need to write a CC script!
2 dev-y side notes:
Since you're already using Node.js, I would suggest using socket.io for a super easy-to-use, well documented solution for WebSockets.
Is this open source? I'd love to have a peak at the source code behind this.
No problem. I'm guessing you just wanted to know how to access tables in LUA, so I recommend looking at the documentation to help you along if you get stuck again. :) https://www.lua.org/pil/2.5.html
Ok so there is too many ends, but thats not the only problem.
Your tabbing. This doesn't cause errors on in the interpreter, but it will cause you to make errors. Once I correctly tabbed out your code, the errors were clear as day. If you tab it yourself, you will see that the last end is unnecessary.
In line 36 you have an end then an else, which is invalid lua. else but always be placed between if-then and end. It looks like you want that code to run if the 3 checks above failed, if so you want to use elseif chaining, you can see how here
Not sure if start() is defined somewhere else but if you get a attempted to call a nil value, that's your problem