conwetlab / ngsi-proxy Goto Github PK
View Code? Open in Web Editor NEWProxy allowing receiving notifications from Orion Context Broker on browser environments
License: GNU Affero General Public License v3.0
Proxy allowing receiving notifications from Orion Context Broker on browser environments
License: GNU Affero General Public License v3.0
curl -X POST {{ngsiproxyurl}}/eventsource
{
"connection_id":"353529a0-281a-11ec-b25b-6d62e91d5158",
"url":"{{ngsiproxyurl}}/eventsource/353529a0-281a-11ec-b25b-6d62e91d5158"
}
Use the previously generated connection_id to create the
callback:
curl -X POST '{{ngsiproxyurl}}/callbacks' \
--data-raw '{
"connection_id": "353529a0-281a-11ec-b25b-6d62e91d5158"
}'
{
"callback_id":"40b18800-281a-11ec-b25b-6d62e91d5158",
"url":"{{ngsiproxyurl}}/callbacks/40b18800-281a-11ec-b25b-6d62e91d5158"
}
The callback to be notified by the context-broker through a
subscription. Use the previously generated callback_id to create
the callback:
curl -X POST '{{ngsiproxyurl}}/callbacks/40b18800-281a-11ec-b25b-6d62e91d5158' \
--data-raw '{
"keyofpayloadcontent": "valueofpayloadcontent"
}'
Use the url returned in "Create eventsource"
const sse = new EventSource('{{ngsiproxyurl}}/eventsource/353529a0-281a-11ec-b25b-6d62e91d5158');
sse.addEventListener("notification", function(e) {
console.log(JSON.parse(e.data));
})
This EventSource will fire everytime the callback is consumed.
I would love to know how could it be used without Wirecloud, just as a proxy between Orion Context Broker and our custom react app.
How do we manage the Orion subscription from the proxy?
Thanks
Useful for people testing if the ngsi-proxy is up and running. Also useful for people accessing the proxy by error.
This welcome page should point to the documentation about how to use it.
I have just installed the latest ngsiproxy using this command:
docker run --name beincpps-ngsiproxy -d fiware/ngsiproxy
The docker container is running properly: docker container ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9c5ade363d3f fiware/ngsiproxy "/bin/sh -c ngsi-p..." 11 minutes ago Up 11 minutes 3000/tcp beincpps-ngsiproxy
But when trying to access in firefox the address http://localhost:3000 , the ngsiproxy is not responding and the page is not accessible.
Do you have any idea?
Thanks!
I have installed the latest ngsiproxy on docker container.I am not able to receive notifications from context broker in wirecloud widget though subscription is created successfully.
Is there a need of additional configuration than issuing
docker run --name some-ngsiproxy -p 3000:3000 -d fiware/ngsiproxy ?
Add documentation about how to configure the NGSI proxy to be served using HTTPS.
Provide a docker image
Current implementation has partial support for Cross-Origin Resource Sharing.
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.