Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

avoscloud-code-mock-sdk

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avoscloud-code-mock-sdk

AVOSCloud Cloud Code Mock SDK.!

  • 0.2.4-rc2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

更新日志

  • 2013-12-02 更新0.2.4 rc1版本,添加七牛官方模块和httpRequest超时和context支持。
  • 2013-11-01 更新0.2.3 beta2版本,修复云代码基本版无法调试的bug。
  • 2013-10-29 更新0.2.3 beta版本,支持从浏览器测试函数,hook等。

说明

为了方便本地运行和调试云代码,请遵照下列步骤进行:

  • 要在本地调试云代码,你需要安装node.js最新版本。
  • 运行命令: sudo npm install -g avoscloud-code-mock-sdk 安装调试SDK。以后更新升级也请执行此命令。
  • 在项目根目录运行avoscloud,将启动本地调试服务器。
  • 访问http://localhost:3000/即可访问到你的云主机代码,子路径按照你在app.js里配置的即可访问。
  • 测试函数:
curl -X POST -H 'Content-Type:application/json' \
    -d '{ "name": "dennis"}' \
    http://localhost:3000/avos/hello

其中hello是你通过AV.Cloud.define定义的函数名称。

  • 测试beforeSave,afterSave,afterUpdate,beforeDelete/afterDelete等:
curl -X POST -H 'Content-Type:application/json' \
     -d '{ "name": "dennis"}' \
	 http://localhost:3000/avos/MyUser/beforeSave

其中MyUser是className,beforeSave指定调用MyUser定义的beforeSave函数,其他函数类似。

FAQs

Package last updated on 06 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc