blockdiag API server and livepreview ui.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
bin
dummy_font
static/js
templates
ui_src
.gitignore
Dockerfile
LICENSE
README.md
docker-compose.yml
pip-selfcheck.json
pyvenv.cfg
requirements.txt
server.py

README.md

blockdiag-api

Demo

Use docker-compose

$ docker-compose build app
$ docker-compose up

API Reference

  • endpoint: /api/v1/<diagram type (actdiag or blockdiag ...)>
  • http method: POST
  • http header: Content-Type: application/json;
  • JSON payload
    {
      "source": "<diagram syntax>"
    }
  • example curl command
    $ curl -XPOST \
       -H 'Content-Type: application/json' \
       -d '{ "source": "blockdiag {\n  A -> B; \n B -> C; \n}" }' \
       http://localhost:8000/api/v1/blockdiag

Development

  • python 3.6.5
  • Node.js v8.11.2
  • npm v5.6.0

Server Side

$ pip install -r requirements.txt
$ python server.py

Client Side

$ cd ui-src
$ npm install
$ npm run start