mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
extended client server communication
This commit is contained in:
parent
94f63fc7b2
commit
81d2aa4ddc
12 changed files with 156 additions and 86 deletions
|
|
@ -2,7 +2,7 @@ define(['http', 'node-static'], function(http, nodeStatic) {
|
|||
|
||||
function HttpServer(options) {
|
||||
options.port = options.port || 1234;
|
||||
options.caching = options.caching || true;
|
||||
options.caching = typeof options.caching != 'undefined' ? options.caching : true;
|
||||
options.rootDirectory = options.rootDirectory || './';
|
||||
|
||||
this.server = null;
|
||||
|
|
@ -31,6 +31,10 @@ define(['http', 'node-static'], function(http, nodeStatic) {
|
|||
fileServer.serveFile('./node_modules/requirejs/require.js', 200, {}, req, res);
|
||||
break;
|
||||
|
||||
case req.url == '/lib/SocketIO.js':
|
||||
fileServer.serveFile('./node_modules/requirejs/require.js', 200, {}, req, res);
|
||||
break;
|
||||
|
||||
case new RegExp(/^\/lib/).test(req.url):
|
||||
fileServer.serve(req, res, function(){
|
||||
self.handleFileError(res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue