
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Communication relay between JavaScript code bases and the Exosphere environment
Communication relay between JavaScript code bases and the Exosphere environment
This library allows you to add Exosphere communication to any Node.js codebase. It is intended to be used in your web or API server. If you want to write a micro-service in Node, please use ExoService-JS, which uses this library internally.
ExoRelay = require("exorelay");
exoRelay = new ExoRelay();
exoRelay.listen();
More details and how to customize the port is described in the spec
Register a handler for incoming commands:
exoRelay.registerHandler("hello", function(payload) {
console.log("Hello " + payload.name);
});
Test this setup:
$ curl -d '{"name": "Joe"}' http://localhost:4000/run/hello_name
More details in the spec
Send a command to Exosphere:
exoRelay.send({ command: "hello", payload: { name: "world" }}, done);
More details in the spec
Commands can be replies to other commands. Each command has a unique command-id. Other commands can reference the id of another command to indicate that they are a reply to that command.
As an example, let's send out a "users/create" command, and handle the reply to it (which the "users" service will send out):
exoRelay.send({ command: "users/create", payload: { name: "Jean-Luc" } }, function(createdUser) {
console.log("user " + createdUser.id + " created");
});
The "users" service would be implemented using the ExoService-JS tool.
More details in the spec
FAQs
Communication relay between JavaScript code bases and the Exosphere environment
The npm package exorelay receives a total of 2 weekly downloads. As such, exorelay popularity was classified as not popular.
We found that exorelay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.