Skip to content

Instantly share code, notes, and snippets.

View michaelweinberg's full-sized avatar

Michael Weinberg michaelweinberg

View GitHub Profile
/*ROUTE CODE*/
server.route({
method:"GET",
path: "/books",
handler: function(request, reply){
fs.readFile("books.json", "utf8", function(err,data){
var links =[];
var list = JSON.parse(data);
for(key in list.books){