Deploying Supamode to Vercel
Learn how to deploy Supamode to Vercel
We provide first-class support for deploying Supamode to Vercel.
To deploy Supamode to Vercel, you have to connect your Supamode project to your Vercel account and create two projects using the same repository:
- Vite APP: This is the main project that will be deployed to Vercel.
- Hono API: This is the API project that will be deployed to Vercel.
Each project has its own vercel.json
file that defines the build and deployment process.
Connecting your Supamode project to your Vercel account
For each project, you have to:
- Go to the Vercel dashboard and click on "New Project".
- Select "Import" and then "Import Git Repository".
- Enter the URL of your Supamode repository and click "Import".
- Wait for Vercel to build your project.
- Once the build is complete, you can access your Supamode project at the URL provided by Vercel.
- Set
apps/api
as the root directory for the API project, and setapps/app
as the root directory for the Vite APP project.
Environment variables
Please set the required environment variables for your project.
Client environment variables
Please refer to the Environment variables section for the list of environment variables to set in the Vite APP project.
Server environment variables
Please refer to the Environment variables section for the list of environment variables to set in the Hono API project.
Setting the Proxy URL in the Vite APP project
At apps/app/vercel.json
, you need to replace the <api-project-url>
(provided as an example) with the URL of the Hono API project that you deployed in Vercel.
{ "rewrites": [ { "source": "/api/:path*", "destination": "<api-project-url>/:path*" }, { "source": "/:path*", "destination": "/" } ]}
NB: You need to replace <api-project-url>
with the URL of the Hono API project that you deployed in Vercel.