Skip to content

Commit d4f55cc

Browse files
Add one-click deploy buttons for major cloud platforms (#13)
* Add Vercel one-click deploy button to frontend header - Add vercel.json configuration for full-stack deployment - Include Vercel deploy button in frontend header with hover effects - Configure routing for API calls to backend and static files to frontend - Add responsive styling for mobile devices - Pre-configure ATXP_CONNECTION_STRING environment variable prompt * Add Render one-click deploy button and configuration - Add render.yaml configuration for dual-service deployment - Include Render deploy button alongside Vercel in frontend header - Configure backend and frontend as separate Render services - Set up environment variables and health check endpoint - Enable free tier deployment with proper routing
1 parent 6e6b236 commit d4f55cc

4 files changed

Lines changed: 78 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ agent-demo/
4343
- `POST /api/texts` - Submit new text
4444
- `GET /api/health` - Health check endpoint
4545

46+
## Quick Deploy
47+
48+
Deploy this ATXP Express example to your preferred cloud platform with one click:
49+
50+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fatxp-dev%2Fatxp-express-example&project-name=atxp-express-example&repository-name=atxp-express-example)
51+
52+
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/atxp-dev/atxp-express-example)
53+
54+
After deploying, you'll need to provide your ATXP connection string through the app's setup screen.
55+
4656
## Quick Start
4757

4858
### Prerequisites

backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"start": "NODE_ENV=production node dist/server.js",
88
"dev": "nodemon --exec ts-node server.ts",
99
"build": "tsc",
10+
"build:worker": "echo 'Cloudflare Workers will build directly from TypeScript source'",
1011
"test": "vitest run",
1112
"test:watch": "vitest",
1213
"test:ui": "vitest --ui"

render.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
services:
2+
- type: web
3+
name: atxp-express-backend
4+
env: node
5+
plan: free
6+
buildCommand: cd backend && npm install && npm run build
7+
startCommand: cd backend && npm start
8+
envVars:
9+
- key: NODE_ENV
10+
value: production
11+
- key: PORT
12+
value: 10000
13+
- key: FRONTEND_PORT
14+
value: 3000
15+
healthCheckPath: /api/health
16+
17+
- type: web
18+
name: atxp-express-frontend
19+
env: static
20+
plan: free
21+
buildCommand: cd frontend && npm install && npm run build
22+
staticPublishPath: frontend/build
23+
routes:
24+
- type: rewrite
25+
source: /api/*
26+
destination: https://atxp-express-backend.onrender.com/api/*
27+
- type: rewrite
28+
source: /*
29+
destination: /index.html

vercel.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 2,
3+
"builds": [
4+
{
5+
"src": "backend/server.ts",
6+
"use": "@vercel/node",
7+
"config": {
8+
"includeFiles": ["backend/**"]
9+
}
10+
},
11+
{
12+
"src": "frontend/package.json",
13+
"use": "@vercel/static-build",
14+
"config": {
15+
"buildCommand": "npm run build",
16+
"outputDirectory": "build"
17+
}
18+
}
19+
],
20+
"routes": [
21+
{
22+
"src": "/api/(.*)",
23+
"dest": "/backend/server.ts"
24+
},
25+
{
26+
"src": "/(.*)",
27+
"dest": "/frontend/$1"
28+
}
29+
],
30+
"env": {
31+
"NODE_ENV": "production"
32+
},
33+
"functions": {
34+
"backend/server.ts": {
35+
"maxDuration": 30
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)