Deploy Fresh App
Fresh is a full stack modern web framework for JavaScript and TypeScript.
This article will teach you how to deploy your Fresh App in Zeabur in one click.
Create Fresh App (Optional)
-
Install Deno on your computer.
-
You can see a more detailed instruction in Deno’s official documentation.
Use the command to initialize a Deno project with Fresh framework.
deno run -A -r https://fresh.deno.dev my-project
In main.ts
, add port: Deno.env.get("PORT")
to the start function in order to make sure the application can listen correctly on the environment variable PORT
given by Zeabur.
// in main.ts
await start(manifest, { plugins: [twindPlugin(twindConfig)], port: Deno.env.get("PORT")}, );
Develop
Run deno task start
to start the development server.
deno task start
Init a GitHub repository for it and upload to your GitHub.
Deploy
Click on Add new service button, then choose Deploy your source code.
Search for your Fresh App repository, click on import, your Fresh App will start deploying.