2016-03-07 20:14:16 +00:00
|
|
|
var server = require("./server");
|
|
|
|
var router = require("./route");
|
|
|
|
var requestHandlers = require("./requestHandlers");
|
|
|
|
|
2016-06-28 18:14:35 +00:00
|
|
|
var debug = false; // todo move this to configfile
|
2016-03-07 20:14:16 +00:00
|
|
|
|
|
|
|
var handle = {}
|
|
|
|
handle["/"] = requestHandlers.sendInterface;
|
|
|
|
handle["/interface"] = requestHandlers.sendInterface;
|
2016-03-15 10:22:03 +00:00
|
|
|
handle["/sprite/emoji.css"] = requestHandlers.sendEmojiCss;
|
|
|
|
handle["/sprite/emoji.png"] = requestHandlers.sendEmojiPng;
|
|
|
|
handle["/js/jquery-1.12.1.min"] = requestHandlers.sendJquery;
|
|
|
|
handle["/js/jquery-ui.js"] = requestHandlers.sendJqueryUI;
|
|
|
|
handle["/css/bootstrap.min.css"] = requestHandlers.sendBootstrap;
|
2016-03-07 20:14:16 +00:00
|
|
|
|
2016-03-15 12:21:33 +00:00
|
|
|
handle["/clear"] = requestHandlers.sendClear;
|
2016-06-28 18:14:35 +00:00
|
|
|
if(server.demoMode==1){
|
|
|
|
handle["/demo"] = requestHandlers.sendDemo;
|
|
|
|
}else{
|
|
|
|
console.log("ERROR: Demo mode not active");
|
|
|
|
}
|
|
|
|
|
2016-03-15 12:21:33 +00:00
|
|
|
|
2016-03-07 20:14:16 +00:00
|
|
|
server.start(router.route,handle,debug);
|