add to server.js

Done, at least I think it is. Seems to work ok.
get rid of statements like these instead of leaving them as comments.