2
1
mirror of https://github.com/s00500/nodeMessageBoard.git synced 2024-11-24 02:50:54 +00:00
nodeMessageBoard/requestHandlers.js

16 lines
483 B
JavaScript
Raw Normal View History

2016-03-07 20:14:16 +00:00
// functions that will be executed when
// typeoff handle[pathname] === a function in requestHandlers.
// the handle and function are discribed in index.js
var fs = require('fs'),
server = require('./server');
function sendInterface(response) {
console.log("Request handler 'interface' was called.");
response.writeHead(200, {"Content-Type": "text/html"});
2016-03-07 20:48:50 +00:00
var html = fs.readFileSync(__dirname + "/board.html")
2016-03-07 20:14:16 +00:00
response.end(html);
}
exports.sendInterface = sendInterface;