Skip to main content

Step 8

Step 8 — Instant deploy with Replit

6 views

Table of contents

Fly.io is fast but Replit doesn't even leave the browser. Lowest-friction PaaS for learners.

First deploy — straight from the browser

  1. Sign up at https://replit.com (GitHub login works).
  2. Create Repl → pick "Node.js" or "Python" template.
  3. Write index.js or main.py:
import express from "express";
const app = express();
app.get("/", (req, res) => res.send("Hello from Replit"));
app.listen(3000, () => console.log("Listening on 3000"));
  1. Click ▶ Run → webview on the right.
  2. Top-right DeployStatic or Reserved VMDeploy.

Live at https://my-repl.replit.app with auto HTTPS.

Four deployment modes

Mode Always on Domain Auto-sleep Use case
Static replit.app static sites (Vite build)
Reserved VM replit.app backends (Express/FastAPI)
Autoscale on demand replit.app partial bursty traffic
Scheduled Job (cron) batch tasks

For learning, Static is free. Backends start at Reserved VM (paid).

.replit file

run = "node index.js"
entrypoint = "index.js"

[deployment]
run = ["sh", "-c", "node index.js"]
deploymentTarget = "cloudrun"

Secrets

Use the 🔒 Secrets panel on the left, not .env. Auto-injects as env vars and doesn't leak when forked.

Replit DB — persistence in one line

import Database from "@replit/database";
const db = new Database();
await db.set("count", 1);
const count = await db.get("count");

Small KV store. Fine for learning. For real SaaS, use PostgreSQL (Replit also offers PG via Neon) or an external DB.

Fly.io vs Replit

Aspect Fly.io Replit
Learning curve low lowest
Built-in IDE
Realtime collab
AI code gen ✓ (Agent)
Free tier 1 instance, 1GB RAM unlimited sleep + 1 Static
Small-scale cost $5+/mo $0 (Static)
Always-on backend requires Core

Learning · pair programming · hackathons → Replit. Stable hosting · custom domain → Fly.io.

Try it

Move the Node.js app from getting-started into Replit and deploy as Static. When done, Settings → Delete this Repl.

AI Agent — generate apps from natural language

Replit's differentiator. Top-right Agent button:

"Build a Todo app with PostgreSQL + Express + login"

→ files · code · DB · deploy are scaffolded automatically. Lowest entry barrier in the field.

Similar tools:

  • Bolt.new (quick Vite/Next PoC)
  • v0.dev (Vercel — UI components)
  • Lovable (Supabase full-stack)
  • Google AI Studio Build (Gemini · Cloud Run)

See AI Web IDE comparison for the full table.

Deeper

Next

Step 9 covers GitHub Pagescompletely free static hosting.