Skip to content

berkeley-biosense/indra-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

indra server

This is a pub/sub server. It was designed with prototyping sensor applications in mind. See this blog post for more details on that.

installation

npm install

running

npm start

using

This server takes POST requests, with content-type application/json, to the route /.

The JSON must include a type field

{
  type: 'someString'
}

It can include any other fields you like ontop of that:

{
  type: 'neurosky-mindwave',
  reading: {
    raw_values: [1353523, 216363, 1235 ... ],
    attention_esense: 53,
    meditation_esense: 83
  }
}

then, on the client side, we can subscribe to socket.IO with type as the event:

var socket = io('my-indra-server')
socket.on('neurosky-mindwave', function (d) {
  // do stuff with the neurosky data
})

As an added bonus, the data you get back when you subscribe will contain a receivedAt field indicating when the data got to the server.

developing

stuff should be pretty self-explanatory.

to run the tests,

npm start

to run the server, then

npm test

About

POST-based collection server for mwm data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published