Whizan Cloud ServicesDocumentation Hub
Documentation/Compute & Applications/Frontend Web Hosting

Frontend Web Hosting

Supported:Next.jsViteReactAstroVue.jsStatic HTML/CSS

When to Use This Service

Ideal Use Cases
  • Single Page Applications (SPAs) built with Vite, React, or Vue
  • Server-Side Rendered (SSR) web applications built with Next.js (App Router or Pages Router)
  • Static site generators such as Astro, Gatsby, or Hugo
  • Marketing landing pages, documentation portals, and web dashboards requiring global CDN distribution
  • Frontends requiring custom domain names with automated TLS/SSL certificate provisioning
When to Choose Another Workload
  • Heavy background processing tasks or queue consumers (use Backend Microservices instead)
  • Long-running stateful WebSocket connections (use Backend Microservices instead)
  • Relational database servers (use Managed Persistence instead)

How to Use & Deploy

Option 1Deploy via Web Console

  1. 1Navigate to the Developer Console and click '+ New Project' or 'Deploy Frontend'.
  2. 2Select your Git repository or choose 'Direct Archive Upload'.
  3. 3Choose your framework (Next.js, Vite, React, or Astro) — build commands and output directories are auto-configured.
  4. 4Add required environment variables (e.g., NEXT_PUBLIC_API_URL).
  5. 5Click 'Deploy'. Once built, your site is immediately live with a dedicated URL.

Option 2Deploy via CLI & Terminal

Deploy instantly from your local workspace terminal using the global Whizan CLI:

$ whizan deploy --frontend
Or prompt your AI Coding Assistant (Cursor / Antigravity MCP):
“Deploy this frontend application to Whizan Cloud”

Practical Project Example

package.json
{
  "name": "my-web-app",
  "version": "1.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  }
}

Configuration Reference

Parameter / SettingDescriptionDefault / Recommended
Build CommandCommand executed during deployment to compile your assetsnpm run build
Output DirectoryDirectory containing generated static files or build artifactsdist (Vite) / .next (Next.js)
Install CommandPackage manager installation commandnpm install
Custom DomainCustom apex or subdomain (e.g. app.mycompany.com) with automatic HTTPSOptional

Best Practices & Pro Tips

Tip 1Zero-Downtime Blue/Green Deployments: Every redeployment launches side-by-side (`app-${slug}-${shortId}`). The existing container continues serving live traffic until the new container passes deep HTTP readiness checks.
Tip 2Origin & CSRF Match: Whizan's Edge Router and Live Gateway automatically forward the canonical public hostname (`x-forwarded-host: <slug>.whizan.cloud`), ensuring Next.js Server Actions and framework CSRF origin checks pass seamlessly.
Tip 3For Next.js App Router applications with dynamic routes, ensure your project uses standard Next.js standalone server mode without static export restrictions.
Tip 4Store client-accessible environment variables with standard framework prefixes (e.g. NEXT_PUBLIC_ or VITE_).
Tip 5Each deployment generates an immutable preview URL so you can test changes before cutting over.