Coder Social home page Coder Social logo

webofthings / webofthings.js Goto Github PK

View Code? Open in Web Editor NEW
73.0 73.0 26.0 1.24 MB

A gateway and server reference implementation of the Web of Things model

Home Page: http://book.webofthings.io

License: Apache License 2.0

JavaScript 69.09% HTML 30.91%

webofthings.js's People

Contributors

domguinard avatar marcbachmann avatar vladounet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webofthings.js's Issues

Why I can't see access the headers when requesting 'http://gateway.webofthings.io/'

Hi, I'm trying to build a basic app that allows display data shared by the WoT Book Pi device.
First I need to discover the properties and actions. I ant to check that the provided URL is a 'Thing'.
I decided to check the content of the header Link. I use the following code with url = 'http://gateway.webofthings.io/'

return axios .get(url, { headers: { Accept: 'application/json' } }) .catch(err => { console.log('Error Discovering...', err); }) .then(res => { // Check model for links console.log(res.headers); });

I see the Headers in Postman or chrome Network tab. but Not in the res.headers.
Can you help me with this problem? I think it is related to some "access-control-allow-headers" options..

switch to different framework

given the limitations associated with the recent versions of NodeJS why not move to another language like Golang while maintaining the same model?

Object.observe is obsolete with ES6. Try to find a solution with Proxy

Object.observe(resources.links.actions.resources[actionId].data, function (changes) {
       ^

TypeError: Object.observe is not a function
at C:_Utilisateur\Project\ObjectIn\webofthings.js\plugins\corePlugin.js:70:
12
at arrayEach (C:_Utilisateur\Project\ObjectIn\webofthings.js\node_modules\l
odash\internal\arrayEach.js:15:9)
at Object. (C:Utilisateur\Project\ObjectIn\webofthings.js\node
modules\lodash\internal\createForEach.js:15:9)
at CorePlugin.observeActions (C:_Utilisateur\Project\ObjectIn\webofthings.j
s\plugins\corePlugin.js:69:5)
at CorePlugin.start (C:_Utilisateur\Project\ObjectIn\webofthings.js\plugins
\corePlugin.js:30:26)
at initPlugins (C:_Utilisateur\Project\ObjectIn\webofthings.js\wot-server.j
s:50:14)
at createServer (C:_Utilisateur\Project\ObjectIn\webofthings.js\wot-server.
js:12:3)
at Object. (C:_Utilisateur\Project\ObjectIn\webofthings.js\wot.j
s:2:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.runMain (module.js:575:10)
at run (node.js:348:7)
at startup (node.js:140:9)

TypeError: Object.observe is not a function

TypeError: Object.observe is not a function
at d:\Project\webofthings.js-master\plugins\corePlugin.js:68:12
at arrayEach (d:\Project\webofthings.js-master\node_modules\lodash\internal\arrayEach.js:15:9)
at Object. (d:\Project\webofthings.js-master\node_modules\lodash\internal\createForEach.js:15:9)
at exports.LedsPlugin.CorePlugin.observeActions (d:\Project\webofthings.js-master\plugins\corePlugin.js:67:5)
at exports.LedsPlugin.CorePlugin.start (d:\Project\webofthings.js-master\plugins\corePlugin.js:30:26)
at initPlugins (d:\Project\webofthings.js-master\wot-server.js:50:14)
at createServer (d:\Project\webofthings.js-master\wot-server.js:12:3)
at Object. (d:\Project\webofthings.js-master\wot.js:2:1)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node wot.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Misplaced bullet

In corePlugin.js, the bullet #B on line 24 should actually be on line 22 as it is about doAction and not doSimulate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.