API server for Codify Dev - HTTP API bridge to browser extension.
npm install @codify-dev/api-serverHTTP API server for Codify Dev browser extension.
``bash`
npx @codify-dev/api-server
The server will start on http://127.0.0.1:13580 by default.
| Variable | Default | Description |
| ------------- | ------- | -------------- |
| API_PORT | 13580 | HTTP API port |API_WS_PORT
| | 13581 | WebSocket port |
`bash`
curl http://127.0.0.1:13580/
`json`
{ "ready": true, "platform": "figma" }
`bash`
curl -X POST http://127.0.0.1:13580/get_design \
-H "Content-Type: application/json" \
-d '{ "nodeId": "123:456" }'
`bash`
curl -X POST http://127.0.0.1:13580/get_screenshot \
-H "Content-Type: application/json" \
-d '{ "nodeId": "123:456" }'
`bash`
curl -X POST http://127.0.0.1:13580/get_assets \
-H "Content-Type: application/json" \
-d '{
"nodes": [
{ "nodeId": "123:500", "format": "png", "scale": 2 },
{ "nodeId": "123:501", "format": "svg" }
]
}'
```
Agent ──HTTP──► API Server ◄──WebSocket── Browser Extension
- Node.js 18+
- Codify Dev browser extension