Create rest.js

Initial commit of rest.js file