Do not write a Blueprint until localhost works.
1. Install and start
From typescript/:
npm installnpm startExpected log:
Service Card (TypeScript) on http://0.0.0.0:3000From python/:
python3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txtpython main.pyExpected log:
Uvicorn running on http://0.0.0.0:3000Open http://localhost:3000.
2. Prove it works
- Read the title The headline defaults to
Service Card(fromSERVICE_TITLE). - Check the runtime The card shows TypeScript or Python for your track.
- Click Ping The ping count increases. That hit your server process.
Optional env check (stop the server first):
SERVICE_TITLE="Hello from my laptop" npm startSERVICE_TITLE="Hello from my laptop" python main.pyRefresh. The headline should match your string.
3. Side-by-side code (same routes)
Both tracks expose the same surface:
| Route | Purpose |
|---|---|
GET / | Service Card UI |
GET /api/info | JSON status |
POST /api/ping | Increment in-memory counter |
GET /health | ok |
Server entry: typescript/src/server.ts (Express, binds 0.0.0.0, reads PORT).
Server entry: python/main.py (FastAPI; Uvicorn binds 0.0.0.0 and PORT).
Ping counts reset when you restart. On Render Free, sleep/restart does the same. Expected.
Troubleshooting
| Symptom | Fix |
|---|---|
command not found: npm | Install Node.js 20+ (TypeScript track) |
command not found: python3 | Install Python 3.10+ (Python track) |
| Port in use | PORT=3001 npm start or PORT=3001 python main.py |
What you learned
- Local proof before any cloud config
- SERVICE_TITLE proves env vars later on Render
- Next: a short cloud vocabulary pass