Using the CLI
Installation
The Edge Runtime can be also consumed from your terminal when you install it globally in your system:
npm -g install edge-runtimeUsage
The CLI provides you different ways to evaluate an script with Edge Runtime APIs constraints.
You can just start an interactive session with --repl:
edge-runtime --replEvaluate an inline script with --eval:
edge-runtime --eval "Object.getOwnPropertyNames(this)"Run a local HTTP server:
edge-runtime --listen examples/fetch.jsand more. In any case, you can see all this information typing edge-runtime --help.