Skip to content

Instantly share code, notes, and snippets.

View tipiirai's full-sized avatar

Tero Piirainen tipiirai

View GitHub Profile
ar http = require('http');
var fs = require('fs');
var util = require('util');
var fileCache;
var sendFile = function(conn, file) {
conn.writeHead(200, {"Content-Type": "text/html", "Content-Length": file.length});
conn.write(file);
conn.end();
}