NodeJS RESTful helper