js web and api code

This commit is contained in:
2019-06-24 13:00:36 -05:00
parent 5af35f1b34
commit 25a7abb344
2 changed files with 65 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ block content
code out()
| function. Then, call the
code breakpoint()
| function to send those outputs to DevBug.
| function to send those outputs to DevBug. Currently, there are official clients for Node.js, PHP, and Javascript (Web). However, the clients make use of a generic exposed API endpoint which you can use from anywhere.
h2 Node.js
p To use DevBug in a Node.js app, install the "devbugjs" NPM package. Then, to initialize DevBug, use the following code snippet at any point in the application:
pre
@@ -17,3 +17,12 @@ block content
| function.
pre
code #{devbug.code.php}
h2 JavaScript (Web)
p
| This snippet works by loading jQuery via a script tag when a breakpoint is triggered.
pre
code #{devbug.code.js}
h2 Using the API
p You can post output to DevBug projects from anywhere using the DevBug API. Here's how:
pre
code #{devbug.code.api}