Installations
npm install pm2-axon-rpc
Score
98.1
Supply Chain
98.9
Quality
75.9
Maintenance
100
Vulnerability
100
License
Developer
unitech
Developer Guide
Module System
CommonJS
Min. Node Version
>=5
Typescript Support
No
Node Version
15.4.0
NPM Version
7.0.15
Statistics
15 Stars
64 Commits
7 Forks
3 Watching
2 Branches
5 Contributors
Updated on 19 Jun 2024
Bundle Size
7.71 kB
Minified
3.02 kB
Minified + Gzipped
Languages
JavaScript (99.33%)
Makefile (0.67%)
Total Downloads
Cumulative downloads
Total Downloads
378,129,003
Last day
-1.2%
269,104
Compared to previous day
Last week
2.7%
1,575,604
Compared to previous week
Last month
5.1%
6,531,486
Compared to previous month
Last year
-32.3%
79,089,989
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
3
axon-rpc
RPC client / server for axon.
arpc(1)
The arpc(1)
executable allows you to expose entire
node modules with a single command, or inspect
methods exposed by a given node.
Usage: arpc [options] <module>
Options:
-h, --help output usage information
-V, --version output the version number
-a, --addr <addr> bind to the given <addr>
-m, --methods <addr> inspect methods exposed by <addr>
Server
1var rpc = require('axon-rpc') 2 , axon = require('axon') 3 , rep = axon.socket('rep'); 4 5var server = new rpc.Server(rep); 6rep.bind(4000);
Server#expose(name, fn)
Expose a single method name
mapped to fn
callback.
1server.expose('add', function(a, b, fn){ 2 fn(null, a + b); 3});
Server#expose(object)
Expose several methods:
1server.expose({ 2 add: function(){ ... }, 3 sub: function(){ ... } 4});
This may also be used to expose an entire node module with exports:
1server.expose(require('./api'));
Client
1var rpc = require('axon-rpc') 2 , axon = require('axon') 3 , req = axon.socket('req'); 4 5var client = new rpc.Client(req); 6req.connect(4000);
Client#call(name, ..., fn)
Invoke method name
with some arguments and invoke fn(err, ...)
:
1client.call('add', 1, 2, function(err, n){ 2 console.log(n); 3 // => 3 4})
Client#methods(fn)
Request available methods:
1client.methods(function(err, methods){ 2 console.log(methods); 3})
Responds with objects such as:
1{ 2 add: { 3 name: 'add', 4 params: ['a', 'b', 'fn'] 5 } 6}
License
(The MIT License)
Copyright (c) 2014 TJ Holowaychuk <tj@learnboost.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.6
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More