christiankrag 3fcebac27f Switch to ES module exports for wws runtime
- Replace module.exports with export default
- wws uses ES modules, not CommonJS
- Fixes 'module is not defined' error

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

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

Mylder WebAssembly Serverless Functions

Self-hosted serverless functions using 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

curl -X POST https://wws.mylder.io/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Help me brainstorm ideas", "provider": "zai"}'

Webhook

curl -X POST "https://wws.mylder.io/webhook?source=gitea" \
  -H "Content-Type: application/json" \
  -d '{"event": "push", "repo": "mylder-frontend"}'

Development

# 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.

Description
Mylder WebAssembly Serverless Functions
Readme 47 KiB
Languages
JavaScript 97.4%
Dockerfile 2.6%