Deploy your static web applications instantly to get a shareable URL
Deploy your static web applications instantly.
The simplest way to deploy is using cURL with a ZIP file of your built app:
curl -X POST https://aiswforge.com/api/spa-deploy/deploy \
-F "file=@dist.zip" \
-F "projectId=my-project" \
-F "userId=user123"
# For React (after npm run build)
cd build && zip -r ../dist.zip . && cd ..
# For Vue/Vite (after npm run build)
cd dist && zip -r ../dist.zip . && cd ..
# For Next.js (after npm run build)
cd out && zip -r ../dist.zip . && cd ..
{
"success": true,
"deployment": {
"id": "happy-panda-x7k9",
"url": "https://happy-panda-x7k9.user-spa.com",
"files": 15,
"totalSize": 1593176
}
}
const FormData = require('form-data');
const axios = require('axios');
const fs = require('fs');
async function deployApp(zipPath) {
const formData = new FormData();
formData.append('file', fs.createReadStream(zipPath));
formData.append('projectId', 'my-project');
formData.append('userId', 'user123');
try {
const response = await axios.post(
'https://aiswforge.com/api/spa-deploy/deploy',
formData,
{ headers: formData.getHeaders() }
);
console.log('Deployed to:', response.data.deployment.url);
return response.data.deployment.url;
} catch (error) {
console.error('Deployment failed:', error.response?.data?.message);
throw error;
}
}
// Usage
deployApp('./dist.zip');
import requests
def deploy_app(zip_path):
url = 'https://aiswforge.com/api/spa-deploy/deploy'
with open(zip_path, 'rb') as f:
files = {'file': ('app.zip', f, 'application/zip')}
data = {
'projectId': 'my-project',
'userId': 'user123'
}
response = requests.post(url, files=files, data=data)
if response.status_code == 200:
deployment_url = response.json()['deployment']['url']
print(f'Deployed to: {deployment_url}')
return deployment_url
else:
raise Exception(f"Deployment failed: {response.json()['message']}")
# Usage
deploy_app('./dist.zip')
Build with npm run build
, deploy build/
folder
Build with npm run build
, deploy dist/
folder
Use output: 'export'
, deploy out/
folder
Any static files with index.html
at root
index.html
at the root level./style.css
, not /style.css
)file
- ZIP file containing your built static siteprojectId
- String identifier for your projectuserId
- String identifier for the user{
"success": true,
"deployment": {
"id": "happy-panda-x7k9",
"projectId": "my-project",
"userId": "user123",
"created": "2025-07-11T23:44:25.039Z",
"framework": "react",
"files": 15,
"totalSize": 1593176,
"url": "https://happy-panda-x7k9.user-spa.com"
}
}
{
"error": "Deployment failed",
"message": "Specific error details"
}
The ZIP file should contain the built/compiled static files with index.html
at the root:
index.html
favicon.ico
static/
css/
main.[hash].css
js/
main.[hash].js
index.html
favicon.ico
css/
app.[hash].css
js/
app.[hash].js
chunk-vendors.[hash].js
index.html
style.css
script.js
assets/
[images, fonts, etc.]
This document provides information for Language Models to deploy static web applications (React, Vue, Next.js, plain HTML/CSS/JS) to a production hosting service.
The SPA Deploy Service allows instant deployment of static websites via a simple API. Each deployment:
https://[generated-id].user-spa.com
Endpoint: POST https://aiswforge.com/api/spa-deploy/deploy
Request:
POST
multipart/form-data
file
: ZIP file containing the built static siteprojectId
: String identifier for the projectuserId
: String identifier for the usercurl -X POST https://aiswforge.com/api/spa-deploy/deploy \
-F "file=@dist.zip" \
-F "projectId=my-project" \
-F "userId=user123"
The ZIP file should contain the built/compiled static files. The structure depends on the framework:
After running npm run build
, zip the build
folder contents:
index.html
favicon.ico
manifest.json
robots.txt
static/
css/
main.[hash].css
js/
main.[hash].js
media/
[images]
After running npm run build
, zip the dist
folder contents:
index.html
favicon.ico
css/
app.[hash].css
js/
app.[hash].js
chunk-vendors.[hash].js
index.html
style.css
script.js
assets/
[images, fonts, etc.]
index.html
at the top level of the ZIP.<!-- Good -->
<link href="./styles.css" rel="stylesheet">
<script src="./script.js"></script>
<!-- Bad -->
<link href="/styles.css" rel="stylesheet">
<script src="http://localhost:3000/script.js"></script>
This API enables instant deployment of LLM-generated web applications. Each deployment gets a permanent URL that's immediately accessible worldwide via CloudFront CDN.