mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
adapted bootstrapping
This commit is contained in:
parent
ec84e8d025
commit
36c0e34dc5
5 changed files with 28 additions and 15 deletions
11
app/Bootstrap/Client.js
Executable file
11
app/Bootstrap/Client.js
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
requirejs.config({
|
||||
baseUrl: 'app'
|
||||
});
|
||||
|
||||
var inspector = {};
|
||||
|
||||
requirejs(["Bootstrap/Client"], function(Client) {
|
||||
|
||||
var client = new Client(location.href);
|
||||
inspector.client = client;
|
||||
});
|
||||
|
|
@ -36,7 +36,7 @@ function(http, nodeStatic) {
|
|||
fileServer.serveFile('./node_modules/requirejs/require.js', 200, {}, req, res);
|
||||
break;
|
||||
|
||||
case new RegExp(/^\/lib/).test(req.url):
|
||||
case new RegExp(/^\/app/).test(req.url):
|
||||
fileServer.serve(req, res, function(){
|
||||
self.handleFileError(res)
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
requirejs.config({
|
||||
baseUrl: 'app'
|
||||
});
|
||||
|
||||
var inspector = {};
|
||||
|
||||
requirejs(["Client/Networker", "Vendor/SocketIO"], function(Networker, SocketIO) {
|
||||
var socket = SocketIO.connect(location.href);
|
||||
var networker = new Networker(socket);
|
||||
|
||||
inspector.networker = networker;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue