#Nuxt with JuliaLang

6 messages · Page 1 of 1 (latest)

quartz drum
#

I have some Julia code that I need to add a Vue based UI to for my job. So I am planning on going with Nuxt for this project. I am pretty unfamiliar with this area though so I was hoping I could get some advice from this community on best way to start and maybe some resource for connecting a different language (specifically Julia ideally) to a Nuxt app.

The app is pretty much an interactive medical image processing tool. Users need to be able to upload large image files along with simple csv files. They need to be able to interact with these images and based on these interactions, the Julia code will process the image accordingly and then output an updated image. We will eventually add some neural nets into the image processing pipeline but the overall app shouldn’t change too much.

Any ideas where to start and maybe even some example code for connecting a Nuxt app’s frontend to a julia server?

sand prairie
# quartz drum I have some Julia code that I need to add a Vue based UI to for my job. So I am ...

Can you add some kind of api service to interact with the server?

https://discourse.julialang.org/t/implement-a-rest-server-in-julia/9117/3

Then nuxt can make requests to the api and execute commands accordingly

Julia Programming Language

If you just need a couple of endpoints just to expose computations to the outer world, I’d go with HttpServer.jl - it’s very basic and low-level, but worked well for me a couple of times. If you need more complex routing, Mux.jl should a better fit. Genie.jl is more like Django in Python world: it’s server + ORM + templates, etc., for me it turn...

quartz drum
#

@sand prairie yeah I can do that through HTTP.jl or a few other packages. I’m still not positive how to combine that with a Nuxt app though. Are there any examples that you know of?

sand prairie
#

https://nuxt.com/docs/api/utils/dollarfetch

There is also an example for posting data to the endpoint here ^

You would need a form for the user to upload their files, and then to correctly massage the data and submit to your endpoint using POST.

quartz drum
#

I’ll put together an example using HTTP.jl. Should I expect to be able to use Nuxt to $fetch() a response from a Julia file that returns an api response? E.g. fetch(api/processing.jl)?