Skip to content

Instantly share code, notes, and snippets.

View erichonorez's full-sized avatar

Eric Honorez erichonorez

  • Buy Way Services
  • Brussels
View GitHub Profile
@erichonorez
erichonorez / rest_api.js
Created February 10, 2013 19:09
A simple REST API with Node.js and Express
/**
* TaskRepository class deals with task persistence
*/
function TaskRepository() {
this.tasks = [];
this.nextId = 1;
}
/**
* Find a task by id
* Param: id of the task to find