@fastly/expressly
TypeScript icon, indicating that this package has built-in type declarations

2.3.0 • Public • Published

expressly

Express-style router for Fastly Compute.

Using expressly

Check out the docs.


First, head over to developer.fastly.com to get started with JavaScript on Fastly Compute:

  1. Learn about Fastly Compute: developer.fastly.com/learning/compute/
  2. Create your first JavaScript app: developer.fastly.com/learning/compute/javascript/

Install expressly

Install expressly from the npm registry:

npm i @fastly/expressly
yarn add @fastly/expressly

Your first expressly app

Replace the contents of your Compute app's src/index.js with the following:

import { Router } from "@fastly/expressly";

const router = new Router();

router.get("/", async (req, res) => {
  return res.send("Hello world!");
});

router.listen();

Try it out

Start your app locally:

fastly compute serve

This will start your service on http://localhost:7676.

Examples

Check out the JavaScript code examples for Compute on Fastly's Developer Hub.

Package Sidebar

Install

npm i @fastly/expressly

Weekly Downloads

276

Version

2.3.0

License

MIT

Unpacked Size

5.14 MB

Total Files

38

Last publish

Collaborators

  • therealdoramatadora
  • harmony7
  • triblondon