Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
service-cloud-service
Advanced tools
Readme
Allows to create a cloud of services.
Let's say we want to create a serivce called hello-world
and this service has an action called say
which produces a message with the sentence Hello World!
depending on the language given in the options of the action.
const service = require('service-cloud-service');
const server = new service.ServiceCloudServer({
address: 'localhost',
port: 1900
});
const service = new service.ServiceCloudService('hello-world');
serviceHelloWorld.addAction('say', function(data, callback) {
const messages = {
'en': 'Hello World!',
'fr': 'Bonjour le Monde!',
'es': 'Hola el Mundo!'
};
callback(undefined, {
message: messages[data.language]
});
});
server.addService(serviceHelloWorld);
const server = new service.ServiceCloudServer({
address: 'localhost',
port: 1900
});
server.addService(service1);
server.addService(service2);
server.addService([ service4, service5 /* [...] */ ]);
If the server cannot find the requested service, it can ask to its gateways. If the gateway has gateways, it can ask to them too, leading to a network of services.
const server = new service.ServiceCloudServer({
address: 'localhost',
port: 1900
});
server.addResolveGateway('http://localhost:1818');
server.addResolveGateway([ 'http://localhost:1818', 'http://localhost:1819' /* [...] */ ]);
server.addResolveGateway({
address: 'localhost',
port: 2000,
path: '/my/root/path',
protocol: 'https:'
});
server.addResolveGateway([{
address: 'localhost',
port: 2000,
path: '/my/root/path',
protocol: 'https:'
}, {
address: 'localhost',
port: 2005,
path: '/my/root/path',
protocol: 'https:'
} /* [...] */ );
server.reference({
serviceName: 'my-service-name'
actionsName: [
'action1',
'action2',
'action3'
],
remote: 'http://localhost:1600'
});
FAQs
Allows to create a cloud of services
The npm package service-cloud-service receives a total of 0 weekly downloads. As such, service-cloud-service popularity was classified as not popular.
We found that service-cloud-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.