Skip to content

Instantly share code, notes, and snippets.

View JKRhb's full-sized avatar
:octocat:

Jan Romann JKRhb

:octocat:
View GitHub Profile
@JKRhb
JKRhb / coffee-machine-demo.js
Last active December 5, 2023 01:18
A simple demo illustrating the use of node-wot's consume and discover APIs
const { Servient } = require("@node-wot/core");
const { HttpClientFactory } = require("@node-wot/binding-http");
// create Servient and add HTTP binding
const servient = new Servient();
servient.addClientFactory(new HttpClientFactory());
servient.start().then(async (WoT) =>{
// Let's request and print our test TD!
// Use http://localhost:8081/coffee-machine when running the node-wot coffee machine locally.
{
"ietf-mud:mud": {
"mud-version": 1,
"mud-url": "https://gist.githubusercontent.com/JKRhb/d76aab0e40056648a921bbadc0bbe2e5/raw/05e6d2d8b87d07641c58dae88a29a4b27284c1fc/demonstrator.mud.json",
"last-update": "2022-07-13T19:39:55+00:00",
"cache-validity": 48,
"is-supported": true,
"systeminfo": "A node for the student project NAMIB at the University of Bremen, Germany.",
"mfg-name": "NAMIB",
"documentation": "https://github.com/namib-project/wot-nodes",
@JKRhb
JKRhb / keybase.md
Created September 26, 2017 21:36
Varification for keybase.io

Keybase proof

I hereby claim:

  • I am jkrhb on github.
  • I am jkr_hb (https://keybase.io/jkr_hb) on keybase.
  • I have a public key ASCkFBr0aZIu39Oqs9PgobXZS9eKfmBpbtogwsHqXAiKywo

To claim this, I am signing this object: