edgekitjs - v0.0.51
    Preparing search index...

    Installation

    To install EdgeKit.js, run the following command:

    bun install edgekitjs
    

    This will install EdgeKit.js in your project.

    Next, you need to bootstrap EdgeKit.js in your Cloudflare Worker script. To do this, add the following code to your worker.js file:

    import { bootstrap } from "edgekitjs";

    export default bootstrap({
    onRequest(request) {
    // Write your application here
    return new Response("Hello, World!", {
    headers: {
    "content-type": "text/plain",
    },
    });
    },
    });

    To create a new Edge-first app using EdgeKit.js, run the following command:

    npx degit edgefirst-dev/starter my-app
    

    This will give you a new Cloudflare Worker project with EdgeKit.js already set up and React Router v7.

    Once the application has been created, you can start it locally by running the following command:

    cd example-app
    bun install
    bun run dev

    To configure EdgeKit.js, you need to create a .dev.vars file in the root of your project. Here is an example configuration:

    APP_ENV="development"
    
    CLOUDFLARE_ACCOUNT_ID=""
    CLOUDFLARE_DATABASE_ID=""
    CLOUDFLARE_API_TOKEN=""
    
    GRAVATAR_API_TOKEN=""
    
    VERIFIER_API_KEY=""
    

    This configuration file will be used to set up the necessary environment variables for your application.