Skip to content

zeabur/deno-fresh-template

Repository files navigation

deno-fresh-template

Deploy on Zeabur

  • Follow the commands to bootstrap your Deno project with Fresh framework:

    deno run -A -r https://fresh.deno.dev my-project
    cd my-project
    deno task start
  • In ./main.ts, add port: Deno.env.get("PORT") to the start function and listen to the custom port given the .env file

    start(manifest, { plugins: [twindPlugin(twindConfig)], port: Deno.env.get("PORT")}, );
  • To run locally, copy .env.defaults to a new file .env, and modify .env by assigning the port that you would like to run your application.

    cp .env.defaults .env
    # in .env
    PORT=<your port>
  • Do not add fresh.gen.ts to your .gitignore file.