Skip to content

Commit

Permalink
Add a fake prices endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmund von der Burg committed Dec 25, 2012
1 parent da81b83 commit 2c1f1f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ module.exports = function () {
});
});

// fake handler for the books endpoints
app.get("/books/:isbn/prices", function (req, res) {
var isbn = req.param("isbn");
res.jsonp([
{ price: 56.78 },
{ price: 12.34 },
{ price: 34.56 },
]);
});

// 404 everything
app.all("*", function (req, res) {
res.status(404);
Expand Down

0 comments on commit 2c1f1f8

Please sign in to comment.