Using Vercel and Nile together
Vercel provides the developer tools and cloud infrastructure to build, scale, and secure high performance web applications. Nile’s NextJS examples such as the AI-native Todo App, KnowledgeAI and Code Assistant are all written in NextJS and deployed on Vercel. In this guide we’ll walk you through using Vercel’s dashboard to create a NextJS project integrated with Nile database. We’ll use Nile’s NextJS quickstart as an example. If you don’t already have a Vercel account, go ahead and create one here.Create a database
- Login to your Vercel workspace and click on the storage tab and then on Create Database
- From the Marketplace Database Providers select Nile Database and click on continue.
- Choose a region and a price tier (price tier can be changed later, the region is fixed).

- Edit the auto-generated database name, if you wish, and click on create.

Deploying Nile’s NextJS Quickstart
- Start by forking Nile’s github repo. You can do this by clicking the “Fork” button in the top right corner of the screen.
- Back in Vercel’s dashboard, click on Add New* to create a new project. The “Import project” section will show the repository you just cloned - click on Import.
- You’ll be redirected to the “Configure project” screen. There are few things we need to change:
- Project name: Give your project a meaningful name. For example
nile-vercel-nextjs
. - Root Directory: Set the root directory to
/examples/quickstart/nextjs
- Click “Deploy”.
Connecting Nile Database to a Project
-
In the project dashboard, select the storage tab. You’ll see the database that you created in a previous step. Click on connect.
You can use the same database for all environments, or use separate databases for development and production. You can create additional Nile databases from this screen, if needed, with the create database button.
- Once you connected a database to the project, the project’s environment variables will populate with the database connection details.
- Re-deploy the project for the new configuration to take effect.