Added rest endpoint to server.js