Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 796 Bytes

cli.mdx

File metadata and controls

38 lines (25 loc) · 796 Bytes
title description
Command-line Interface
Learn how to install and run the Edge Runtime as a CLI.

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.