Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Dependencies
std
Versions
Overlord
A runner for your scripts so you donโt have to deploy them. ๐
Overlord takes a root directory (or a root URL) containing a bunch of JS or TS scripts and serves them using a lightweight http server. Each time overlord receives a request, it spawns a Worker which imports the scripts and runs it in an isolated environment.
Experimental. Use at your own risk. ๐ฅ
Background
Deno is very suitable for running scripts. Itโs a single executable, you donโt have to manage dependencies, it has top-level await, and runs Typescript by default. I wanted to add upon that by providing an easy and secure way to call these scripts remotely.
Usage
CLI
- Install it:
deno --unstable install --allow-net --allow-read https://deno.land/x/overlord/cli.ts
- Use it:
overlord -r https://deno.land/x/overlord/cli.ts/examples
- Try it:
curl localhost:8080/hello_world.ts
Programatically
import { Overlord } from "https://deno.land/x/overlord/mod.ts"
const overlord = new Overlord({
rootPath: "https://deno.land/x/overlord/cli.ts/examples",
port: 5000,
});
overlord.start();
Features
- Zero dependancies (unless you count deno std).
- Lightweight and fast; with an ~80mb executable and just using deno std http server.
- Easy configuration.
- Deploy anywhere; your local machine, a server, in docker or kubernetes, or even serverless (with some caching considerations).
When Should I Use This?
- You want to run scripts in an isolated environment.
- You want a self-hostable alternative to deno deploy.
- Lazy load and build your scripts.
Roadmap
- Remove
unstable
features once Deno 2.0 is released. - Support WebAssembly.
- Resource limits for workers. This is not planned to be supported by Deno at the moment, so we will have to find a workaround.