add resource.js to route restful resource.