rax-plugin-faas

0.1.2 • Public • Published

rax-plugin-faas npm

rax-scripts plugin for FaaS, the plugin based on Function Compute of Alibaba cloud.

The plugin support following features:

  • Integrated development experience, All codes are in the same directory
  • The easy way to run devServer in the local
  • The easy way to build client code and functions package

Usage

Dependencies

Rax-plugin-faas based on Function Compute of Alibaba cloud, so you need install docker and @alicloud/fun first:

About docker instructions of installation, you can found in the docker docs.

Then install @alicloud/fun to your devDependencies:

$ npm install @alicloud/fun -D

And you need install rax-plugin-faas to your devDependencies:

$ npm install rax-plugin-faas -D

Configure

Add rax-plugin-faas to build.json like:

{
  "plugins": [
    [
      "rax-plugin-app",
      {
        "targets": ["web", "weex"]
      }
    ],
    [
      "rax-plugin-faas",
      {
        "aliyunConfig": {   // Your function compute config
          "id": "xxxxxxxx",
          "region": "cn-hangzhou"
        },
        "functionGroup": {
          "name": "raxTest",
          "root": "src/api", // The functions dir
          "functions": {
            "user": {
              "path": "user" // The function path relative to root config
            }
          }
        }
      }
    ]
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i rax-plugin-faas

Weekly Downloads

0

Version

0.1.2

License

BSD-3-Clause

Unpacked Size

11.8 kB

Total Files

11

Last publish

Collaborators

  • oraaange
  • yundong