Files
wws-functions/README.md
christiankrag c8a8ea007d Initial wws serverless functions setup
- Add health check API endpoint (/api)
- Add chat proxy to n8n workflow (/chat)
- Add webhook receiver for external integrations (/webhook)
- Add Dockerfile for container deployment
- Add wws.toml configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 05:43:11 +01:00

45 lines
1.0 KiB
Markdown

# Mylder WebAssembly Serverless Functions
Self-hosted serverless functions using [wasm-workers-server](https://github.com/vmware-labs/wasm-workers-server). Cloudflare Workers compatible API with zero vendor lock-in.
## Endpoints
| Path | Description |
|------|-------------|
| `/api` | Health check and service info |
| `/chat` | Chat proxy to n8n AI workflow |
| `/webhook` | Webhook receiver for external integrations |
## Usage
### Chat API
```bash
curl -X POST https://wws.mylder.io/chat \
-H "Content-Type: application/json" \
-d '{"message": "Help me brainstorm ideas", "provider": "zai"}'
```
### Webhook
```bash
curl -X POST "https://wws.mylder.io/webhook?source=gitea" \
-H "Content-Type: application/json" \
-d '{"event": "push", "repo": "mylder-frontend"}'
```
## Development
```bash
# Install wws
curl -fsSL https://workers.wasmlabs.dev/install | bash
# Run locally
wws .
# Test
curl http://localhost:8080/api
```
## Deployment
Deployed via Dokploy with auto-deploy from Gitea on push to main branch.