Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
avoscloud-code-mock-sdk
Advanced tools
为了方便本地运行和调试云代码,请遵照下列步骤进行:
package.json
,cloud_code.js
,mock.js
),放到你的云代码项目的根目录,跟cloud目录平级。.gitignore
文件:node_modules/
package.json
cloud_code.js
mock.js
local_storage.json
npm install -d
安装依赖。node mock.js
启动调试服务器。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
定义的函数名称。
curl -X POST -H 'Content-Type:application/json' \
-d '{ "name": "dennis"}' \
http://localhost:3000/avos/MyUser/beforeSave
其中MyUser
是className,beforeSave指定调用MyUser
定义的beforeSave函数,其他函数类似。
FAQs
AVOSCloud Cloud Code Mock SDK.!
The npm package avoscloud-code-mock-sdk receives a total of 2 weekly downloads. As such, avoscloud-code-mock-sdk popularity was classified as not popular.
We found that avoscloud-code-mock-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.