Learn full-stack web development using fastn in a week
Learn Now

Publishing Static Site On Vercel

Vercel is an incredibly easy to use tool which helps you build and ship your websites with an easy to use interface.
⚠️
You Lose Many Dynamic Features In Static Modes
fastn comes with a lot of dynamic features, which are only available when you are using FifthTry Hosting

Deploying existing fastn projects to Vercel

  • Add vercel.json to the root of your project (right where your FASTN.ftd lives) with the following contents:
vercel.json
{
    "framework": null,
    "buildCommand": "fastn build --base=/",
    "outputDirectory": ".build",
    "installCommand": "curl -fsSL https://fastn.com/install.sh | sh"
}
Lang:
json

Creating a new fastn project and deploy it on Vercel

We recommend using our template repository fastn-template to create a new fastn project.

  • Creating your own repository
Open the fastn-template repository in your browser and click on the Use this template button
Step I: Use the template repository to initialize your repository
  • Follow the instruction to create a new Github repository from this template.

  • Wait for the Github Action to finish running. This Action renames package name in FASTN.ftd to match with your repository name and your Github username.

  • We'll be opting for a different deployment method instead of using GitHub Pages. Feel free to delete the .github folder to eliminate these GitHub Actions from your repository.

  • Now create a new Vercel deployment by importing this repository.

If you have created a fastn project from scratch using fastn create-package <your-package-name>. Follow the instructions above to add a vercel.json file.