# Turso + Render

> Deploy a JavaScript app using [Turso Cloud embedded replicas](/features/embedded-replicas) to [Render](https://render.com/).
> Canonical HTML: https://tursodb.cn/docs/features/embedded-replicas/with-render/
> Upstream Source (MIT): https://docs.turso.tech/features/embedded-replicas/with-render
> Language: en

---
![Render banner](/images/turso-docs/platforms/render-banner.png)

## Prerequisites

Before you start, make sure you:

* [Install the Turso CLI](/docs/cli/installation/)
* [Sign up or login to Turso Cloud](/docs/cli/authentication/#signup)
* Have a Render account - [create one](https://dashboard.render.com/)

**1. Retrieve database credentials**

You will need an existing database to continue. If you don't have one, [create one](/docs/quickstart/).

Get the database URL:

```bash
turso db show --url <database-name>
```

Get the database authentication token:

```bash
turso db tokens create <database-name>
```

Assign credentials to the environment variables inside `.env`.

```bash
TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=
```

<div class="doc-callout doc-callout-info"><div class="doc-callout-title">NOTE</div><div class="doc-callout-body">

You will want to store these as environment variables.

</div></div>


**2. Get application code**

Fork the following embedded replica project from GitHub locally:

<div class="doc-cards">
<a class="doc-card" href="https://github.com/tursodatabase/embedded-replicas-with-js" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>My Expenses Tracker - (Elysia + Bun)</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div><p class="doc-card-desc">See the full source code</p></a>
</div>


<div class="doc-callout doc-callout-info"><div class="doc-callout-title">NOTE</div><div class="doc-callout-body">

Or, you can:

> [card] [Deploy to Render with a single-click](https://render.com/deploy?repo=https://github.com/tursodatabase/embedded-replicas-with-js)

</div></div>


**3. Create a web service**

Create a new Render **Web Service** by clicking on the "New Web Service" button on the Web Services card inside you Render dashboard.

**4. Connect to Git repository**

1. Select "build and deploy from a Git repository" and proceed to the next page.

2. Click on "Connect" for your target project repository

**5. Set project's environment variables**

On the web service configuration page, under "Advanced" add **a secret file** and fill it in with your database secret credentials:

![Render secret credentials](https://mintlify.s3.us-west-1.amazonaws.com/turso/features/embedded-replicas/images/platforms/render-env-vars.png)

**6. Deploy project**

Scroll to the bottom of the web service configuration page and click on "Create Web Service".
