devbug/app/views/dash_v1/use/api.pug

14 lines
692 B
Plaintext
Raw Normal View History

2019-07-24 20:30:51 +00:00
extends ../template
block content
h3 DevBug supports anywhere within the reach of your network.
p You can use DevBug in any language that supports sending multipart/form-data POST requests. This is accomplished via the DevBug API. This is the same procedure the native DevBug clients use. The API is fairly simple to use and contains a single endpoint. The snippet below details how to use it:
2019-07-24 21:39:49 +00:00
pre#editor.inline #{devbug.code.api}
2019-07-24 20:30:51 +00:00
block scripts
script(src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js")
script.
const editor = ace.edit('editor');
editor.setTheme('ace/theme/cobalt');
editor.session.setMode('ace/mode/javascript');
editor.setOption('readOnly', true);