UNPKG
pm2-axon-rpc
Version:
latest (0.7.1)
0.7.1
0.7.0
0.6.0
0.5.2
0.5.1
0.5.0
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.0
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.2.1
0.2.0
0.0.2
Remote procedure calls built on top of axon.
github.com/unitech/pm2-axon-rpc
unitech/pm2-axon-rpc
pm2-axon-rpc
/
example.js
16 lines
(12 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
exports.add =
function
(
a, b, fn
)
{
fn
(
null
, a + b
)
; }; exports.sub =
function
(
a, b, fn
)
{
fn
(
null
, a - b
)
; }; exports.uppercase =
function
(
str, fn
)
{
fn
(
null
, str.toUpperCase(
)
)
; }; exports.lowercase =
function
(
str, fn
)
{
fn
(
null
, str.toLowerCase(
)
)
; };