Deno’s self-deployed cloud function framework
git clone https://github.com/raw2cc/deno-faas
cd deno-faas
cp .env.example .env
deno run -A --unstable .\mod.ts
curl http://localhost:3000/test1
Copy .env.example
to .env
, in .env
the configuration server port and function to obtain the address of the file.
For example, remote=https://raw.githubusercontent.com/raw2cc/deno-faas/main/test/
means:
I request /test1
will look for https://raw.githubusercontent.com/raw2cc/deno-faas/main/test/test1.ts
the file, if found, would pull him off then loaded.
Function file can have two functions, one is init
one call
, init
it will only be called once after loading, call
will be called when the request comes.
Every 10 minutes, the server will automatically reload all cloud functions.
See the example folder.
It is estimated that there are many bugs, welcome to try.
Author: raw2cc
Source Code: https://github.com/raw2cc/deno-faas
#deno #nodejs #node #javascript