Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serve socket io with namespace to avoid conflicts #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ackuaria.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var ackuaria_router = express.Router();
var bodyParser = require('body-parser');
var app = express();
var http = require('http').createServer(app);
var io = require('socket.io')(http);
var io = require('socket.io')(http, {path: "/ackuaria/socket.io/"});
var path = require('path');
var partials = require('express-partials');
var N = require('./nuve');
Expand Down Expand Up @@ -113,4 +113,4 @@ ackuaria_router.post('/delete/:roomID', function(req, res) {
var roomID = req.params.roomID;
API.rooms[roomID].failed = [];
res.send(API.rooms[roomID]);
})
})
4 changes: 2 additions & 2 deletions public/javascripts/publishers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var socket = io();
var socket = io('/', {path: '/ackuaria/socket.io'});
var view_type = "grid";

$(document).ready(function(){
Expand Down Expand Up @@ -313,4 +313,4 @@ var updateAlerts = function(){

$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
})
2 changes: 1 addition & 1 deletion public/javascripts/rooms.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var socket = io();
var socket = io('/', {path: '/ackuaria/socket.io'});
var show_grid = true;

$(document).ready(function(){
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/subscribers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var socket = io();
var socket = io('/', {path: '/ackuaria/socket.io'});
var show_grid = true;
var audio, video;
var subscribers = {};
Expand Down Expand Up @@ -537,4 +537,4 @@ $(document).ready(function(){
paintSubscribersGrid();
paintPublishers();

});
});
2 changes: 1 addition & 1 deletion views/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="lib/bootstrap-3.3.2-dist/js/bootstrap.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="/ackuaria/socket.io/socket.io.js"></script>
<script src="javascripts/graphs.js" type="text/javascript"></script>
<script src="javascripts/<%=view%>.js" type="text/javascript"></script>
<script src="lib/sortable.min.js"></script>
Expand Down