add to server.js to make it RESTful API