Command-line Interface

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-runtime

Usage

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 --repl

Evaluate an inline script with --eval:

edge-runtime --eval "Object.getOwnPropertyNames(this)"

Run a local HTTP server:

edge-runtime --listen examples/fetch.js

and more. In any case, you can see all this information typing edge-runtime --help.