webofthings / webofthings.js Goto Github PK
View Code? Open in Web Editor NEWA gateway and server reference implementation of the Web of Things model
Home Page: http://book.webofthings.io
License: Apache License 2.0
A gateway and server reference implementation of the Web of Things model
Home Page: http://book.webofthings.io
License: Apache License 2.0
Hello everyone! I would like to ask if this implementation currently supports (completely or to some degree) all the operations - I think there are 18 operations totally - described in the W3C Web Thing Model (https://www.w3.org/Submission/wot-model/). With the word "operations" I mean Retrieve a Web Thing, Update a Web Thing, Retrieve the model of a Thing, etc.
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..
On line 76 of wot-server.js
, the bullet #D
should read #C
.
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(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
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.
In corePlugin.js
, the bullet #B
on line 24 should actually be on line 22 as it is about doAction
and not doSimulate
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.