use resource module to make app RESTful