mirror of
https://github.com/mattstyles/yeoman-angular-express-plus.git
synced 2026-04-20 03:00:18 -04:00
18 lines
390 B
JavaScript
18 lines
390 B
JavaScript
'use strict';
|
|
|
|
// Main sockets object
|
|
var io = require( './../server' ).io;
|
|
|
|
// Connection route - bootstraps the other socket routes
|
|
io.sockets.on( 'connection', function( socket ) {
|
|
|
|
socket.emit( 'send:onConnect', {
|
|
data: 'Sockets Connected'
|
|
} );
|
|
|
|
// Example socket
|
|
// @todo remove the requirement to pass in the socket
|
|
require( './example' )( socket );
|
|
|
|
} );
|