Development Process for Working with Genie and Javascript REST API

The workflow that I would suggest in your case is to run both servers locally on different ports. Make sure that the Julia API server sets the header

Access-Control-Allow-Origin: *

and you can then access it from the browser using:

fetch("http://localhost:1234/...", {mode: "cors"}).then(...)

where 1234 is the port of the Julia API.

If your front-end needs to be compiled using Node, then install Node locally and use a dev server. Running locally makes your life a lot easier!

Lots of apps can be written without a compile step - have a look at Preact and HTM to replace React and JSX - they work in the browser right away.

2 Likes