Skip to main content

Hosting with Vercel

Make sure you have the NiekForm repository forked and cloned on the Github account you use on Vercel. See the previous section for more information.

Creating a Vercel project

Head over to the Vercel dashboard and create a new project with the Niekform repository. You can leave everything as-is, NiekForm is a Next.js application and Vercel will automatically detect that.

Environment variables

Make sure you enter the following environment variables:

KeyExplanationExample
DATABASE_URLThe database URL you copied from PlanetScalemysql://....
EMAIL_FROMThe email address you want to send email fromniek@example.com
EMAIL_SERVER_USERYour email server userapikey (for sendgrid)
EMAIL_SERVER_PASSWORDYour email server passwordSG.abcdefghijklmnopqrstuvwxyz
EMAIL_SERVER_HOSTYour email server hostsmtp.sendgrid.net
EMAIL_SERVER_PORTEmail server port465, 587
NEXT_PUBLIC_SITE_URLThe URL of your sitehttps://niekform.vercel.app
NEXTAUTH_SECRETA random string of charactersany random string
DATABASE_PROVIDERThe database provider (e.g. mysql), make sure this is the same as the one you set in your prisma/schema.prisma filemysql/postgres

Deploying

You can now deploy your application to Vercel. Once your deployment is finished you can optionally set up a custom domain.