Whizan Cloud ServicesDocumentation Hub
Documentation/Compute & Applications/Backend Microservices & APIs

Backend Microservices & APIs

Supported:Node.js (Express, Fastify, Nest)Python (FastAPI, Django, Flask)GoDocker

When to Use This Service

Ideal Use Cases
  • RESTful APIs and GraphQL servers written in Node.js, Python, Go, or custom Dockerfiles
  • Stateful web backends requiring database pooling and session management
  • WebSocket servers, chat applications, and real-time streaming engines
  • Background worker processes consuming jobs from Redis or database queues (run as worker services)
  • Applications requiring custom system dependencies via Dockerfile
When to Choose Another Workload
  • Single-purpose webhook listeners or sporadic micro-tasks (use Serverless Edge Functions to eliminate idle cost)
  • Static single page applications with no server logic (use Frontend Hosting for lower latency and CDN caching)

How to Use & Deploy

Option 1Deploy via Web Console

  1. 1From the console, select 'Deploy Service' or navigate to Backend Services.
  2. 2Provide your repository or source directory.
  3. 3Select your language runtime or select 'Dockerfile'.
  4. 4Specify your start command (e.g. 'npm start' or 'uvicorn main:app --host 0.0.0.0 --port 8000').
  5. 5Set your internal application port (e.g. 3000, 8000) and any secret environment variables (DATABASE_URL, JWT_SECRET).
  6. 6Click 'Deploy Service'. Whizan will build, launch, and monitor your service container.

Option 2Deploy via CLI & Terminal

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

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

Practical Project Example

main.py
import os
from fastapi import FastAPI

app = FastAPI(title="My Microservice API")

@app.get("/")
def read_root():
    return {"status": "healthy", "service": "orders-api"}

@app.get("/health")
def health_check():
    return {"ok": True}

if __name__ == "__main__":
    import uvicorn
    port = int(os.environ.get("PORT", 8000))
    # Important: Bind to 0.0.0.0 so the router can reach your service
    uvicorn.run(app, host="0.0.0.0", port=port)

Configuration Reference

Parameter / SettingDescriptionDefault / Recommended
Internal PortPort your web server listens on inside the container3000 / 8000
Start CommandCLI command executed to start your server processAuto-detected
Worker ModeFlag for background queue workers that do not expose an HTTP portfalse
Health PathHTTP endpoint checked to verify service readiness/ or /health

Best Practices & Pro Tips

Tip 1Always bind your web server to '0.0.0.0', never to '127.0.0.1' or 'localhost'.
Tip 2Read the port from the 'PORT' environment variable if provided, with a fallback to your preferred port.
Tip 3For background workers with no HTTP server, toggle 'Worker Mode' to enable process liveness health checking.