Skip to content

simple, self-hostable deno cloud function runtime

Notifications You must be signed in to change notification settings

jgerstbe/denotask

Repository files navigation

denotask

Denotask is a poor mans deno edge runtime. It spins up a webserver using deno and matches a subdomain path with a local folder to execute a deno script inside that folder. Thanks to the "secure by default" deno runtime these user provided scripts can be executed with restricted permissions:

  • allow-net to download deno packages and interact with external apis
  • allow-read restricted to the folder containing the script and needed library files or the ipc between the server and the scripts deno process

The name is inspired by the shut down webtask.io service which was provided by auth0.

Setup

  • copy (and edit) the env file
    cp .env.example .env
  • as the routing is based on subdmains you need to setup a reverse proxy or add the needed entries to your hostfile
  • run it with docker
    docker compose up
  • or run it locally
    deno run --allow-net --allow-read="./" --allow-run="deno" --allow-env="HOSTNAME,PORT,WS_HOSTNAME,WS_PORT,FUNCTIONS_SUBDOMAIN,LOCAL_TASK_DIR" index.ts