@@ -268,15 +268,100 @@ Here are the detailed instructions for running the generated API Dash code in **
268
268
269
269
# # Go (net/http)
270
270
271
- TODO
271
+ # ## 1. Install Go compiler
272
+
273
+ - Windows and MacOS: check out the [official source](https://go.dev/doc/install)
274
+ - Linux: Install from your distro' s package manager.
275
+
276
+ Verify if go is installed:
277
+
278
+ ```bash
279
+ go version
280
+ ```
281
+
282
+ ### 2. Create a project
283
+ ```bash
284
+ go mod init example.com/api
285
+ ```
286
+
287
+ ### 3. Run the generated code
288
+ - Paste the generated code into `main.go`.
289
+ - Build and run by `go run main.go`.
272
290
273
291
## JavaScript (axios)
274
292
275
- TODO
293
+ The generated api code can be run in browser by using the code in an html file as demonstrated below:
294
+
295
+ ### 1. Create the html file with generated code
296
+
297
+ Create a new file `index.html`
298
+
299
+ ```html
300
+ <!DOCTYPE html>
301
+ <html>
302
+ <head>
303
+ <title>Axios Example</title>
304
+ <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
305
+ </head>
306
+ <body>
307
+ <script>
308
+ // Paste your API Dash generated code here !!
309
+ </script>
310
+ </body>
311
+ </html>
312
+
313
+ ```
314
+
315
+ Make sure to paste the generated js code from api dash under the `<script>` tag.
316
+
317
+ ### 2. Test with Browser Developer Tools
318
+
319
+ Open the `index.html` file in a modern browser and open devtools.
320
+
321
+ - **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
322
+
323
+ - **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
324
+
325
+ - **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
326
+
327
+ Navigate to network tab and refresh the page to see the requests and network activity.
276
328
277
329
## JavaScript (fetch)
278
330
279
- TODO
331
+ The generated api code can be run in browser by using the code in an html file as demonstrated below:
332
+
333
+ ### 1. Create the html file with generated code
334
+
335
+ Create a new file `index.html`
336
+
337
+ ```html
338
+ <!DOCTYPE html>
339
+ <html>
340
+ <head>
341
+ <title>Fetch Example</title>
342
+ </head>
343
+ <body>
344
+ <script>
345
+ // Paste your API Dash generated code here !!
346
+ </script>
347
+ </body>
348
+ </html>
349
+
350
+ ```
351
+
352
+ Make sure to paste the generated js code from api dash under the `<script>` tag.
353
+
354
+ ### 2. Test with Browser Developer Tools
355
+
356
+ Open the `index.html` file in a modern browser and open devtools.
357
+
358
+ - **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
359
+
360
+ - **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
361
+
362
+ - **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
363
+
364
+ Navigate to network tab and refresh the page to see the requests and network activity.
280
365
281
366
## node.js (JavaScript, axios)
282
367
0 commit comments