pm2-axon-rpc
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -97,4 +97,5 @@ | ||
var args = [].slice.call(arguments, 1); | ||
args.forEach(function(arg, i) { | ||
args[i] = JSON.parse(Stringify(arg)); | ||
args.map(function(arg) { | ||
return JSON.parse(Stringify(arg)); | ||
}); | ||
@@ -101,0 +102,0 @@ |
{ | ||
"name": "pm2-axon-rpc", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Remote procedure calls built on top of axon.", | ||
@@ -10,6 +10,3 @@ "keywords": [ | ||
], | ||
"author": { | ||
"name": "TJ Holowaychuk", | ||
"email": "tj@learnboost.com" | ||
}, | ||
"author": "TJ Holowaychuk <tj@learnboost.com>", | ||
"contributors": [ | ||
@@ -28,3 +25,3 @@ { | ||
"devDependencies": { | ||
"pm2-axon": "2.0.0", | ||
"pm2-axon": "~2.0.2", | ||
"better-assert": "*", | ||
@@ -42,15 +39,5 @@ "mocha": "*" | ||
"type": "git", | ||
"url": "https://github.com/visionmedia/axon-rpc.git" | ||
"url": "https://github.com/unitech/pm2-axon-rpc.git" | ||
}, | ||
"license": "MIT", | ||
"readme": "\n# axon-rpc\n\n RPC client / server for [axon](https://github.com/visionmedia/axon).\n\n## arpc(1)\n\n The `arpc(1)` executable allows you to expose entire\n node modules with a single command, or inspect\n methods exposed by a given node.\n\n```\n\nUsage: arpc [options] <module>\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -a, --addr <addr> bind to the given <addr>\n -m, --methods <addr> inspect methods exposed by <addr>\n\n```\n\n## Server\n\n```js\nvar rpc = require('axon-rpc')\n , axon = require('axon')\n , rep = axon.socket('rep');\n\nvar server = new rpc.Server(rep);\nrep.bind(4000);\n```\n\n### Server#expose(name, fn)\n\n Expose a single method `name` mapped to `fn` callback.\n\n```js\nserver.expose('add', function(a, b, fn){\n fn(null, a + b);\n});\n```\n\n### Server#expose(object)\n\n Expose several methods:\n\n```js\nserver.expose({\n add: function(){ ... },\n sub: function(){ ... }\n});\n```\n\n This may also be used to expose\n an entire node module with exports:\n\n```js\nserver.expose(require('./api'));\n```\n\n## Client\n\n```js\nvar rpc = require('axon-rpc')\n , axon = require('axon')\n , req = axon.socket('req');\n\nvar client = new rpc.Client(req);\nreq.connect(4000);\n```\n\n### Client#call(name, ..., fn)\n\n Invoke method `name` with some arguments and invoke `fn(err, ...)`:\n\n```js\nclient.call('add', 1, 2, function(err, n){\n console.log(n);\n // => 3\n})\n```\n\n### Client#methods(fn)\n\n Request available methods:\n\n```js\nclient.methods(function(err, methods){\n console.log(methods);\n})\n```\n\n Responds with objects such as:\n\n```js\n{\n add: {\n name: 'add',\n params: ['a', 'b', 'fn']\n }\n}\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 TJ Holowaychuk <tj@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", | ||
"readmeFilename": "Readme.md", | ||
"bugs": { | ||
"url": "https://github.com/visionmedia/axon-rpc/issues" | ||
}, | ||
"homepage": "https://github.com/visionmedia/axon-rpc", | ||
"_id": "pm2-axon-rpc@0.2.1", | ||
"_shasum": "4f9fc5c8bccb9fc58eb18b0f5473a8238821ea1f", | ||
"_from": "pm2-axon-rpc@~0.2.1", | ||
"_resolved": "https://registry.npmjs.org/pm2-axon-rpc/-/pm2-axon-rpc-0.2.1.tgz" | ||
"license": "MIT" | ||
} |
# axon-rpc | ||
[![Build Status](https://travis-ci.org/unitech/pm2-axon-rpc.png)](https://travis-ci.org/unitech/pm2-axon-rpc) | ||
RPC client / server for [axon](https://github.com/visionmedia/axon). | ||
@@ -5,0 +7,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11
133
9556
1
2