/*
- Copyright(c) 2012 all rights reserved
- License: MIT License
- Author : aleelock@126.com */
/**
- append these codes to
- {express_app_dir}/app.js */ require('rpc4express').dir(__dirname+'/rpc').app(app);
/**
- {express_app_dir}/rpc/User.js */ this.plus = function(a,b){ var that = this; setTimeout(function(){ that.backcall(a+b); },1000); }
/**
- client side */
......
User.plus(1,2, function(result){ alert(result); });