https://kotlinlang.org logo
#ktor
Title
# ktor
n

Niko

08/17/2022, 4:33 PM
I'm building a service that offers a documents-system that acts in similar way as the Static contents plugin's
static {}
block that offers serving static files, but with my system markdown pages are lazily converted to HTML, cached and served. I'm thinking how I could decouple deploying the service and the documents to allow more dynamic deploy and update of the actual documents. Currently the block resolves the files from classpath, but I was thinking additionally I could write logic to check a configurable path, to allow running the service inside container with mounted docs path. Other thing I thought was, if I could implement a way to deploy additional jar containing only the documents to same classpath the service runs in. Any inside or pointers, in achieving any of the two, or another way?
a

Aleksei Tirman [JB]

08/18/2022, 10:40 AM
You can have a separate project with documents in the resources folder to make them available in the classpath:
Copy code
java -cp documents.jar -jar service.jar
n

Niko

08/19/2022, 5:27 AM
Thanks, that's what I came up as well, loading additional jars into the classpath
3 Views