So what I want to do: I want to build a julia package Foo.jl which should be used by users writing scripts in julia primarily. There’s also a secondary group of users who will want to use a subset of the package through a REST API.
The most simple structure I can think of is this:
.
├── Manifest-v1.12.toml
├── Project.toml
├── server.jl
└── src
└── Foo.jl
which I don’t really like since
- It limits the server code to a single file
- It issues
using Foobut foo is just a package that’s not registered. It lives only in the same directory asserver.jl.
I don’t want to split this up into several repos though. I want a monorepo design.
I could do
.
├── api
│ └── server.jl
├── Manifest-v1.12.toml
├── Project.toml
└── src
└── Foo.jl
which solves 1. but not 2.
Has anyone a good feel for what the best practice here is?
The server.jl code is something like this:
using Oxygen
using HTTP
using Foo # The package
@get "/greet" function (req::HTTP.Request)
return "hello world!"
end
# start the web server
serve()
which uses Oxygen.jl but this question is not limited to Oxygen.jl of course.