# Deploy to Netlify (/docs/orm/prisma-client/deployment/serverless/deploy-to-netlify)

Location: ORM > Prisma Client > Deployment > Serverless > Deploy to Netlify

This guide covers the steps you will need to take in order to deploy your application that uses Prisma ORM to [Netlify](https://www.netlify.com/).

Netlify is a cloud platform for continuous deployment, static sites, and serverless functions. Netlify integrates seamlessly with GitHub for automatic deployments upon commits. When you follow the steps below, you will use that approach to create a CI/CD pipeline that deploys your application from a GitHub repository.

Prerequisites [#prerequisites]

Before you can follow this guide, you will need to set up your application to begin deploying to Netlify. We recommend the ["Get started with Netlify"](https://docs.netlify.com/get-started/) guide for a quick overview and ["Deploy functions"](https://docs.netlify.com/functions/deploy/?fn-language=ts) for an in-depth look at your deployment options.

Store environment variables in Netlify [#store-environment-variables-in-netlify]

We recommend keeping `.env` files in your `.gitignore` in order to prevent leakage of sensitive connection strings. Instead, you can use the Netlify CLI to [import values into netlify directly](https://docs.netlify.com/environment-variables/get-started/#import-variables-with-the-netlify-cli).

Assuming you have a file like the following:

```text title=".env"
# Connect to DB
DATABASE_URL="postgresql://postgres:__PASSWORD__@__HOST__:__PORT__/__DB_NAME__"
```

You can upload the file as environment variables using the `env:import` command:

```bash no-break-terminal
netlify env:import .env
```

```bash
site: my-very-very-cool-site
---------------------------------------------------------------------------------.
                         Imported environment variables                          |
---------------------------------------------------------------------------------|
     Key      |                              Value                               |
--------------|------------------------------------------------------------------|
 DATABASE_URL | postgresql://postgres:__PASSWORD__@__HOST__:__PORT__/__DB_NAME__ |
---------------------------------------------------------------------------------'
```

<details>
  <summary>
    If you are not using an 

    `.env`

     file
  </summary>

  If you are storing your database connection string and other environment variables in a different method, you will need to manually upload your environment variables to Netlify. These options are [discussed in Netlify's documentation](https://docs.netlify.com/environment-variables/get-started/) and one method, uploading via the UI, is described below.

  1. Open the Netlify admin UI for the site. You can use Netlify CLI as follows:
     ```bash
     netlify open --admin
     ```
  2. Click **Site settings**:
     <img alt="Netlify admin UI" src="/img/orm/prisma-client/deployment/serverless/images/500-06-deploy-to-netlify-site-settings.png" width="1402" height="506" />
  3. Navigate to **Build & deploy** in the sidebar on the left and select **Environment**.
  4. Click **Edit variables** and create a variable with the key `DATABASE_URL` and set its value to your database connection string.
     <img alt="Netlify environment variables" src="/img/orm/prisma-client/deployment/serverless/images/500-07-deploy-to-netlify-environment-variables-settings.png" width="2442" height="980" />
  5. Click **Save**.
</details>

Now start a new Netlify build and deployment so that the new build can use the newly uploaded environment variables.

```bash
netlify deploy
```

You can now test the deployed application.

Connection pooling [#connection-pooling]

When you use a Function-as-a-Service provider, like Netlify, it is beneficial to pool database connections for performance reasons. This is because every function invocation may result in a new connection to your database which can quickly run out of open connections.

You can use [Prisma Postgres](/postgres), which has built-in connection pooling, to reduce your Prisma Client bundle size, and to avoid cold starts.

For more information on connection management for serverless environments, refer to our [connection management guide](/orm/prisma-client/setup-and-configuration/databases-connections#serverless-environments-faas).

## Related pages

- [`Deploy to AWS Lambda`](https://www.prisma.io/docs/orm/prisma-client/deployment/serverless/deploy-to-aws-lambda): Learn how to deploy your Prisma ORM-backed applications to AWS Lambda with AWS SAM, Serverless Framework, or SST
- [`Deploy to Azure Functions`](https://www.prisma.io/docs/orm/prisma-client/deployment/serverless/deploy-to-azure-functions): Learn how to deploy a Prisma Client based REST API to Azure Functions and connect to an Azure SQL database
- [`Deploy to Vercel`](https://www.prisma.io/docs/orm/prisma-client/deployment/serverless/deploy-to-vercel): Learn how to deploy a Next.js application based on Prisma Client to Vercel