server.js:minor refactor