
Express style router for Fastly Compute@Edge
Dont waste time on boilerplate code, use Flight Path
Flight Path is a lightweight and minimal routing layer for C@E apps. Add Flight Path to any Javascript C@E app by install with NPM: npm i flight-path
1import { Router } from "flight-path";
2
3const router = new Router();
4
5router.use((req, res) => {
6 res.setHeader("x-powered-by", "FlightPath");
7});
8
9router.get("/", async (req, res) => {
10 return res.send("Hello World!");
11});
12
13router.get("/api", async (req, res) => {
14 return res.json({
15 message: "Hello from the API!"
16 });
17});
18
19router.listen();
Easy to Use
Flight Path was designed to be familiar to javascript developers with experience making services with popular frameworks like Express
Focus on What Matters
Flight Path lets you focus on your business logic, and we'll do the chores.
Open Source
Available for free to make the web a better place! You're encouraged to read the code, submit issues and send in PRs.