New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Event Callbacks: payload of 'data' event #18

jollen opened this Issue Jul 28, 2016 · 0 comments


None yet
1 participant

jollen commented Jul 28, 2016 is responsible for raw data handling and event emitting.

Event: 'data'

Event callback:

function(payload) {


      data: [Object]
      pathname: [String]
  • data: the raw data
  • pathname: the pathname of request URI


devify-server is responsible for event handling. It's the abstraction of


var onmessage = function(payload) {
    var obj = JSON.parse(;
    var paths = payload.pathname.split('/');
    var deviceId = paths[2];

    console.log('[', deviceId, ']',;

    onmessage: onmessage

The full example is at DevifyPlatform.

@jollen jollen changed the title from Enhance Event Callbacks to Enhance Event Callbacks: payload of 'data' event Jul 28, 2016

jollen added a commit that referenced this issue Jul 28, 2016

Merge pull request #19 from jollen/master
Enhanced: payload of data event, #18

jollen added a commit that referenced this issue Sep 24, 2016

@jollen jollen closed this Mar 8, 2017

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