Created
December 30, 2012 14:53
-
-
Save thebadger412/4413121 to your computer and use it in GitHub Desktop.
Router for node serial example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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