Hi
I've compiled a server app with Oxygen.jl in deps (using PackageCompiler.jl, create_app).
On the same machine everyting works correctly. But on the another it fails when I'm trying to open docs-page (http://loacalhost:8080/docs) with an error, which related with a missing file:
It may be also solved by using RelocatableFolders.jl package. Add to the src/autodoc.jl constant, estimated with a @path macro (I've tested it in a dev mode)
using RelocatableFolders
const DATA_PATH = @path abspath(joinpath(@__DIR__, "..", "data"))
And use the constant inside the function:
function readstaticfile(filepath::String) :: String
path = joinpath(DATA_PATH, filepath)
return read(open(path), String)
end
These are my favorite types of issues: concise, well-researched, and include a solution. Thanks for taking the time to point this out! This change will go out in version 1.2 tonight
Hi I've compiled a server app with Oxygen.jl in deps (using PackageCompiler.jl, create_app). On the same machine everyting works correctly. But on the another it fails when I'm trying to open docs-page (http://loacalhost:8080/docs) with an error, which related with a missing file:
The issue is close to that one https://github.com/GenieFramework/SwaggerMarkdown.jl/issues/8
It may be also solved by using RelocatableFolders.jl package. Add to the src/autodoc.jl constant, estimated with a @path macro (I've tested it in a dev mode)
And use the constant inside the function: