web-deploy
Build and deploy websites, web apps, and APIs to production.
by cmanfre7 · published 2026-03-22
$ claw add gh:cmanfre7/cmanfre7-web-deploy# web-deploy
Build and deploy websites, web apps, and APIs to production.
Local Preview Workflow
# Static site
npx http-server ./dist -p 8080 -c-1
# Next.js
npm run dev # Development (hot reload)
npm run build && npm run start # Production preview
# FastAPI
uvicorn app.main:app --reload --port 8000
# Vite-based
npm run dev # Dev server
npm run build && npx serve dist # Production previewDeployment Targets
Vercel (Frontend / Next.js / Static)
# First time setup
npx vercel link
# Preview deployment
npx vercel
# Production deployment
npx vercel --prod
# Environment variables
npx vercel env add SECRET_KEY**Best for:** Next.js apps, React SPAs, static sites, serverless functions.
**Config:** `vercel.json` (usually not needed for Next.js)
{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "nextjs"
}Railway (Backend / APIs / Databases)
# First time setup
railway login
railway init
# Deploy
railway up
# Add database
railway add --plugin postgresql
# Environment variables
railway variables set SECRET_KEY=value
# View logs
railway logs**Best for:** Backend APIs, databases, long-running processes, Docker containers.
GitHub Pages (Static Sites)
# Using gh-pages package
npm install -D gh-pages
# Add to package.json scripts: "deploy": "gh-pages -d dist"
npm run build && npm run deploy**Best for:** Documentation, simple static sites, project pages.
Canvas (Clawdbot Workspace)
Deploy to `~/clawd/canvas/` for local serving through the clawdbot gateway.
cp -r ./dist/* ~/clawd/canvas/my-project/Pre-Deploy Checklist
Rollback
# Vercel — redeploy previous
npx vercel rollback
# Railway — redeploy previous
railway rollback
# Git-based — revert and push
git revert HEAD && git pushDomain Setup
# Vercel
npx vercel domains add mydomain.com
# DNS: Point CNAME to cname.vercel-dns.com
# Or A record to 76.76.21.21More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...