DocsStatic Sites

Deploying Static Sites

Deploy your frontend applications—React, Vue, Angular, or plain HTML—with Abasthan's lightning-fast static hosting.

1. How it Works

Abasthan builds your static application and serves the resulting assets using a highly optimized Nginx configuration.

2. Build Configuration

For static sites, you must specify both a build command and a publish directory.

  • Build Command: The command that generates your static files (e.g., npm run build). Crucially, this must include dependency installation: npm install && npm run build.
  • Publish Directory: The directory where the build command outputs your static assets (e.g., dist, build, or out).

3. Single Page Applications (SPAs)

Abasthan's Nginx setup is pre-configured to handle SPA routing. If a requested file isn't found, it will automatically serve your index.html, allowing your frontend router (like React Router) to handle the request.

4. Global CDN & SSL

Every static site deployed on Abasthan is automatically served via our global edge network, ensuring minimal latency. We also provision and manage free SSL certificates for all your domains.

# Typical setup for a Vite/React project
Build Command: npm install && npm run build
Publish Directory: dist