mirror of
https://github.com/s00500/nodeMessageBoard.git
synced 2025-07-13 00:11:00 +00:00
Added server and Interface structure
This commit is contained in:
15
requestHandlers.js
Normal file
15
requestHandlers.js
Normal file
@ -0,0 +1,15 @@
|
||||
// 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"});
|
||||
var html = fs.readFileSync(__dirname + "board.html")
|
||||
response.end(html);
|
||||
}
|
||||
|
||||
exports.sendInterface = sendInterface;
|
Reference in New Issue
Block a user