-
Harpo Roeder authoredHarpo Roeder authored
README.md 905 B
Polycentric HTTP Bridge
The Polycentric HTTP Bridge allows programmatic control of a Polycentric client via a REST API.
Configuration
export POLYCENTRIC_HTTP_BRIDGE_PORT=... # default 5005
export POLYCENTRIC_HTTP_BRIDGE_STATE_DIRECTORY=... # default ./state
Build Quick start
git clone --recursive git@gitlab.futo.org:polycentric/polycentric.git
./build-vendored.sh
npm install
npm run build
npm start
API
# Set Username
curl -X POST http://localhost:5005/username --data 'Polycentric HTTP Bridge'
# Set Description
curl -X POST http://localhost:5005/username --data 'I am a bridge'
# Add Server
curl -X POST http://localhost:5005/server --data 'https://srv1-prod.polycentric.io'
# Remove Server
curl -X DELETE http://localhost:5005/server --data 'https://srv1-prod.polycentric.io'
# Post
curl -X POST http://localhost:5005/post --data 'Hello World!'