building the endpoint from scratch using Sockets API (it’s easy in Julia)
using JuliaWebAPI.jl and ZMQ.jl packages (more configuration but more robust)
Using ZMQ you can run something like register(apir, my_function_name; resp_json=true, resp_headers=Dict("Content-Type" => "application/json; charset=utf-8")) to publish any Julia function.
Normally, you put JuliaWebAPI as a frontend to your RESTful functions and you can configure nginx to point to that service.
Yet another, third, option is to look at Genie.jl package.