Skip to content

Instantly share code, notes, and snippets.

@thebadger412
Created December 30, 2012 14:53
Show Gist options
  • Save thebadger412/4413121 to your computer and use it in GitHub Desktop.
Save thebadger412/4413121 to your computer and use it in GitHub Desktop.
Router for node serial example
/*
* GET home page.
*/
var fs = require('fs')
exports.index = function(req, res){
res.writeHead(200, {'Content-Type': 'text/html'});
var contents = fs.readFileSync("./public/index.html", "UTF-8");
res.end(contents);
// res.render('index');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment