mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 03:05:14 +00:00
Function service (#227)
This commit is contained in:
13
examples/function/call/node/callAFunction.js
Executable file
13
examples/function/call/node/callAFunction.js
Executable file
@@ -0,0 +1,13 @@
|
||||
import * as fx from "m3o/function";
|
||||
|
||||
// Call a function
|
||||
async function CallAfunction() {
|
||||
let functionService = new fx.FunctionService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await functionService.call({
|
||||
name: "my-first-func",
|
||||
request: {},
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await CallAfunction();
|
||||
Reference in New Issue
Block a user