Skip to main content

flash

Flash is a framework to build cloud service APIs with Denoflare.

Usage

Create a worker module file:

// index.ts
import { flash } from "https://deno.land/x/flash/mod.ts";

export default flash({
  "/": { message: "Hello Flash!" },

  "/create": {
    POST: () => {
      // Do something here
      return { message: "Created", status: 201 };
    },
  },

  "/object/:name": {
    GET: ({ params }) => ({ name: params.name }),
  },

  404: { message: "Not Found", status: 404 },
});

And run with Denoflare!

denoflare serve index.ts