rpc4express

0.0.1 • Public • Published

/*

  • 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); });

Readme

Keywords

none

Package Sidebar

Install

npm i rpc4express

Weekly Downloads

2

Version

0.0.1

License

none

Last publish

Collaborators

  • aleelock