kd-rope

Koding Rope for Kites

Koding Kite to Kite Require Wrapper

Rope is the require wrapper for kites. It simply wraps with Proxy.

First install koding rope from npm.

npm install kd-rope

You should require kd-rope in kite file.

rope = require "kd-rope"
 
# kite instance... 
 
mykite = rope kiteInstance"mykite"
 
mykite.kiteMethod{params: true}(err, response)->
  # bla bla 
Kite = require 'kd-kite'
rope = require 'kd-rope'
manifest = require './manifest'
 
kite = new Kite manifest,
     pingKite: (options, callback) ->
 
     # anotherKite = rope kite, 'anotherKite' 
 
     # anotherKite.pingKite {param: true}, (err, result)-> 
     #   callback null, result 
 
     return callback null"pong from #{name}"
 
module.exports = kite

It uses proxies to wrap the kites.

mykite = rope kite'mykite'
 
mykite.pingKite {}(err, result)->
  callback nullresult