mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
Function service (#227)
This commit is contained in:
15
examples/function/deploy/node/deployAFunction.js
Executable file
15
examples/function/deploy/node/deployAFunction.js
Executable file
@@ -0,0 +1,15 @@
|
||||
import * as fx from "m3o/function";
|
||||
|
||||
// Deploy a group of functions
|
||||
async function DeployAfunction() {
|
||||
let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await functionService.deploy({
|
||||
entrypoint: "helloworld",
|
||||
name: "my-first-func",
|
||||
project: "tests",
|
||||
repo: "github.com/crufter/gcloud-nodejs-test",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await DeployAfunction();
|
||||
Reference in New Issue
Block a user