Modify server.js and syntax clean up