web-rtc-opencv-socket.io-camel.js

sailsjs-angularjs-web-rtc-opencv-socket.io-camel.js

Angular Core Dependency: ~1.2.5

Added by: Sam Deering

GitHub

Repository

nazt/web-rtc-opencv-socket.io-camel.js

Stats

Stars: 0

Watchers: 0

Forks: 0

Author

Nat
Nat

Module Description

Getting started

Setup

git clone [email protected]:NAzT/sails-0.10-yeoman-angular-seed.git your_project
cd your_project
npm install
bower install
grunt
sails lift 

Yo Angular!

cd assets/linker
yo angular:route myroute
yo angular:controller user
yo angular:directive myDirective
yo angular:filter myFilter
yo angular:view user
yo angular:service myService
yo angular:decorator serviceName

Configurations

App-level socket

  • config/sockets.js

      onConnect: function(session, socket) {
            var socketId = sails.sockets.id(socket);
            var numberOfSockets = Object.keys(socket.namespace.manager.sockets.sockets).length
            socket.emit('connectedUsers', { count: numberOfSockets });
            socket.broadcast.emit('connectedUsers', { count: numberOfSockets });
      }
    

Controller-level socket

  • api/controllers/your_controller.js

      method: function (req, res) {
          sails.io.sockets.emit('rfid', { card_id: req.params.id})
      }
    

Module stats last updated: 2015-06-07 05:44:46

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!