Skip to content

Instantly share code, notes, and snippets.

@eklimcz-zz
Last active August 29, 2015 14:11
Show Gist options
  • Save eklimcz-zz/9973c7b97d4930d827c9 to your computer and use it in GitHub Desktop.
Save eklimcz-zz/9973c7b97d4930d827c9 to your computer and use it in GitHub Desktop.
basic node app for ble scanner
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');
});
@eqzero
Copy link

eqzero commented Apr 30, 2015

why it not work ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment