---
title: Deploy a Replit App with AI on Blossom
url: "/deploy/replit/"
canonical_url: https://blossom88.com/deploy/replit/
markdown_url: https://blossom88.com/deploy/replit.md
summary: Move a Replit Vite and Express web app to a Blossom HTTPS Service using its
  Git repository.
categories:
- deployment
- ai-built-apps
- express
stack:
- TypeScript
- React
- Vite
- Express
- Node.js
---

# Deploy a Replit App with AI on Blossom

[Replit](https://replit.com/) builds apps from prompts. This guide takes a
Vite and Express project from Replit's Git pane to a single Blossom web Service.

![The Replit export rendering its lighting demo on Blossom.](/deploy/assets/images/ai-builder-exports/replit-scene.webp)

![Sprite controls in the Replit-built scene editor.](/deploy/assets/images/ai-builder-exports/replit-controls.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy my Replit app from Git on Blossom. Use the production build and start commands, match the Service port to the app, and verify both the browser and API on the Blossom URL after redeploying.
>
> Follow this guide: https://blossom88.com/deploy/replit/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Have Ready

- **Your Replit Git repository** (Required): Push the source, lockfile and production start settings.
- **Backing data and secrets** (Later): Bring the connection settings for any database, storage or sign-in service you intend to keep.

## How It Runs

| Part | Role | Where |
|---|---|---|
| Express | API and built Vite files | Public Blossom web Service |
| Backing services | Durable data and uploads when your app needs them | Managed Data, persistent storage or your existing provider |

## Push the source to Git

Open **Tools → Git** in the Replit project and push to your repository.
Tell your agent which branch to deploy, and connect its Git provider to
Blossom when the repo is private.
[Replit Git guide](https://docs.replit.com/learn/projects-and-artifacts/version-control)

## Find the production command

> Check `.replit` and `package.json` for the build, production start command
> and the port the server actually listens on.

In the tested app, `npm run build` builds Vite and bundles Express.
`npm run start` starts the bundled server, which serves the browser files
and API on port 5000. Configure the Blossom Service for that port.

Keep Vite and Replit's preview plugins behind the development startup path.
The tested export imports them inside `setupVite` and passes
`--splitting` to esbuild so the production entry can start with only the
runtime dependencies installed by the Buildpack.

For apps using Replit-provided services, decide where PostgreSQL, uploaded
objects and sign-in will live. Move data and update its settings when
changing providers. Use durable storage for files your app writes.

## Deploy the app

> Build the Git branch and deploy the Express server as a Blossom web Service.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom profile:show
    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom git_repo:create --data git_repo.yml
    blossom environment:build_config:update --id environment-100 --data build_config.yml
    blossom service:create --data service.yml
    blossom environment:deploy --id environment-100 --follow

Set the build type to `buildpack` with the `heroku/builder:24` builder.
Use `npm run start` for the web command.
Point the HTTP health check at a read-only route that confirms the server is
ready. The sample used `/api/load-scene-config`.
Push private environment variables before deploying when the app needs them.

</details>

## Try the browser and API

> Open the Blossom URL, run a real browser action and check its API response.
> Repeat after deploying another release.

    blossom environment:deploy --id environment-100 --follow
    blossom release:list --environment environment-100

The tested [lighting demo](https://github.com/dobrado76/pixi-lights-and-shadows)
loads a scene and saves an edit through Express. Its disposable scene file
lives in the Container. Put live user data in durable storage before switching
traffic. Your browser and API share one HTTPS address and release history.

## What You Get

- Your frontend and API together on a Blossom HTTPS URL
- A production start command defined by the repository
- A web Service you can redeploy from Git

Tested on Blossom: A Replit Agent project rendered its scene and its Express API saved and reloaded an edit on both releases.
