aircode-mock-runtime

0.4.3 • Public • Published

AirCode Mock Runtime

实验:在本地模拟 AirCode 的 User Runtime。

Usage

  1. Install
npm install aircode-mock-runtime
  1. Config package.json
{
  ...
  "scripts": {
    "dev": "run-aircode --init",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  ...
}

--init 参数在项目下如果没有src目录,会自动创建src/hello.js云函数。

如果hello.js存在,运行命令的时候,浏览器自动启动并访问hello云函数。

高级用法

修改云函数根目录和服务端口

你可以通过cross-env配置AC_FAAS_ROOTAC_PORT

cross-env AC_FAAS_ROOT=test AC_PORT=3000 run-aircode --init

Readme

Keywords

none

Package Sidebar

Install

npm i aircode-mock-runtime

Weekly Downloads

2

Version

0.4.3

License

MIT

Unpacked Size

15.6 kB

Total Files

18

Last publish

Collaborators

  • spritejs