Last active
August 29, 2015 14:11
-
-
Save eklimcz-zz/9973c7b97d4930d827c9 to your computer and use it in GitHub Desktop.
basic node app for ble scanner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = require('express')(); | |
var http = require('http').Server(app); | |
var io = require('socket.io')(http); | |
var scanner = io.of('/scanner'); | |
scanner.on('connection', function(socket) { | |
console.log('Scanner Connected'); | |
socket.on('message', function(msg) { | |
//recived message from scanner | |
//do some processing here | |
}); | |
socket.on('disconnect', function() { | |
console.log('Scanner Disconnected'); | |
}); | |
}); | |
http.listen(3000, function() { | |
console.log('listening on *:3000'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
why it not work ?