Ship it

Your app is ready — time to put it on the internet.

Push to GitHub

First, push your code to GitHub so Vercel can see it:

  1. Open Source Control in VS Code (⌘⇧G · Ctrl+Shift+G )
  2. Commit your changes with a message like form builder app
  3. Click Sync to push

Create the Vercel project

In Chapter 1, you created a Vercel project for your portfolio site. This is a different app, so it needs its own project.

Go to vercel.com/new. Find your SSR repository and click Import.

What are environment variables?

Before you deploy, you need to tell your live app where its database lives. Locally, your app reads from data/dev.db — a file on your laptop. In production, it needs to connect to your Turso database over the internet.

Environment variables are how you provide these details without putting secrets in your code. They're key-value pairs that differ between environments:

  • Local: the app uses data/dev.db directly — no env vars needed
  • Production: the app needs DB_URL and DB_AUTH_TOKEN to connect to Turso

The code stays the same. The environment provides the right values. This is how you keep secrets like database tokens out of your source code.

Add environment variables

Expand Environment Variables in the Vercel project setup and add both:

  • DB_URL — paste the database URL from the Turso dashboard (the libsql:// one)
  • DB_AUTH_TOKEN — paste the auth token from the Turso dashboard (the long string starting with eyJ...)

Vercel environment variables

Click Deploy.

The real test

Once it's deployed, click the screenshot image link to open your live site, just like you did in Chapter 1. Confirm it ends in .vercel.app — that's your live site.

If you see "Application Error"

The deploy will usually succeed, but the app can fail at runtime if it can't reach the database. Go to the Logs tab in your Vercel project to see the actual error.

Vercel error

If it's a Drizzle or database error, it almost always means DB_URL or DB_AUTH_TOKEN is wrong. Double-check both in Vercel → Settings → Environment Variables, then redeploy.

Create a form, submit a response, and check the results page. Everything works the same as local, but now it's on the internet — your database, your server, a real URL anyone can visit.

Live app

You can also check the Turso dashboard — click Edit Data on your database to see the actual rows your app created.

Click Edit Data on your database

Your forms and submissions tables, with real data