Skip to content

Commit

Permalink
Expose the resource path for accessing static assets
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinvandenbreemen committed Nov 6, 2023
1 parent 1e21a3a commit 4282977
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class StaticContentInteractor {
* Directory name. Will be relative to the running instance
*/
val staticContentRoot = "kttStatic"
val staticContentWebPath = "/res"

/**
* Set up the static content directory
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/vandenbreemen/ktt/web/MainServer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fun startServer(staticContentInteractor: StaticContentInteractor, configInteract

private fun Routing.setupStaticContent(staticContentInteractor: StaticContentInteractor) {
staticContentInteractor.setupDirectory()
staticFiles("/res", File(staticContentInteractor.staticContentRoot))
staticFiles(staticContentInteractor.staticContentWebPath, File(staticContentInteractor.staticContentRoot))
}

private fun Routing.customCssTooling(presenter: WikiPresenter) {
Expand Down

0 comments on commit 4282977

Please sign in to comment.