mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
replaced ){ with ) {
This commit is contained in:
parent
76daceb2e7
commit
551fc943c9
20 changed files with 56 additions and 56 deletions
|
|
@ -12,7 +12,7 @@ function (Channel, CoordinatorLink) {
|
|||
|
||||
process.on('message', function (message) {
|
||||
|
||||
switch(message){
|
||||
switch(message) {
|
||||
case 'CREATE':
|
||||
channel = new Channel(coordinatorLink);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function (http, nodeStatic) {
|
|||
var fileServer = new nodeStatic.Server(options.rootDirectory, { cache: options.caching });
|
||||
|
||||
this.server = http.createServer(
|
||||
function (req, res){
|
||||
function (req, res) {
|
||||
req.addListener('end', function () {
|
||||
switch(true) {
|
||||
case req.url == '/':
|
||||
|
|
@ -37,13 +37,13 @@ function (http, nodeStatic) {
|
|||
break;
|
||||
|
||||
case new RegExp(/^\/app/).test(req.url):
|
||||
fileServer.serve(req, res, function (){
|
||||
fileServer.serve(req, res, function () {
|
||||
self.handleFileError(res)
|
||||
});
|
||||
break;
|
||||
|
||||
case new RegExp(/^\/static/).test(req.url):
|
||||
fileServer.serve(req, res, function (){
|
||||
fileServer.serve(req, res, function () {
|
||||
self.handleFileError(res)
|
||||
});
|
||||
break;
|
||||
|
|
@ -58,11 +58,11 @@ function (http, nodeStatic) {
|
|||
this.server.listen(options.port);
|
||||
}
|
||||
|
||||
HttpServer.prototype.getServer = function (){
|
||||
HttpServer.prototype.getServer = function () {
|
||||
return this.server;
|
||||
}
|
||||
|
||||
HttpServer.prototype.handleFileError = function (res){
|
||||
HttpServer.prototype.handleFileError = function (res) {
|
||||
res.writeHead(404, {'Content-Type': 'text/html'});
|
||||
res.end('<h1>404 not ... found</h1>');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@ function (io) {
|
|||
this.init(options);
|
||||
}
|
||||
|
||||
Socket.prototype.init = function (options){
|
||||
Socket.prototype.init = function (options) {
|
||||
|
||||
var self = this;
|
||||
this.socket.configure('development', function (){
|
||||
this.socket.configure('development', function () {
|
||||
this.set('log level', options.logLevel);
|
||||
});
|
||||
|
||||
this.socket.on('connection', function (user){
|
||||
this.socket.on('connection', function (user) {
|
||||
self.onConnection(user);
|
||||
});
|
||||
}
|
||||
|
||||
Socket.prototype.onConnection = function (socketLink){
|
||||
Socket.prototype.onConnection = function (socketLink) {
|
||||
this.coordinator.createUser(socketLink);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue