Fixed with a minor change to server.js