lazynode

0.1.0 • Public • Published

lazynode

lazily call an upnode server

Creates a lazy object where each method calls up and then calls the method on the remote.

Example Server

var lazynode = require("..")

lazynode({
    time: function (cb) {
        cb(new Date().toString())
    }
}).listen(8642)

Example Client

var lazynode = require("..")

var remote = lazynode.connect({
    port: 8642
    , methods: ["time"]
})

setInterval(function () {
    remote.time(function (t) {
        console.log("time = " + t)
    })
}, 1000)

Installation

npm install lazynode

Contributors

  • Raynos

MIT Licenced

Dependencies (3)

Dev Dependencies (3)

Package Sidebar

Install

npm i lazynode

Weekly Downloads

0

Version

0.1.0

License

none

Last publish

Collaborators

  • raynos