# Local development

Run a local static server for testing frontend changes:

```sh
node dev-server.mjs
```

Then open:

```text
http://127.0.0.1:8088/
```

The server serves files from this checkout with `Cache-Control: no-store` so reloads pick up edits quickly.

## Remote endpoints

- `/api/devices/<tag>` is forwarded to `DEV_DEVICE_ORIGIN` when configured. Use a local synthetic fixture server or an administrator-provided authorized proxy that serves this path. Without it, device lookup returns 503 and the UI keeps its `Device <id>` fallback. This server does not read production secrets or bypass device-lookup authentication.
- `/kidang.fcgi` is proxied through `maa-1` directly to the deployed FastCGI socket, bypassing SSO so the browser receives the GT payload instead of the login HTML.

Optional environment variables:

```sh
PORT=9090 node dev-server.mjs
HOST=127.0.0.1 node dev-server.mjs
DEV_REMOTE_HOST=maa-1 node dev-server.mjs
DEV_DEVICE_ORIGIN=http://127.0.0.1:9091 node dev-server.mjs
```

For edge-proxy installation and the `/etc/superpulse/` secret contract, see
[`deploy/README.md`](deploy/README.md). No PHP or Composer is needed locally.

Quick endpoint check:

```sh
curl 'http://127.0.0.1:8088/api/devices/1'
```
