Skip to content

Commit

Permalink
code handler added
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Aug 9, 2023
1 parent 75fd349 commit 8b0b3d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webly/src/webly/app/routes.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns webly.app.routes
(:require
[webly.web.resources :refer [resource-handler file-handler-nodejs file-handler-bundel]]))
[webly.web.resources :refer [resource-handler file-handler-nodejs file-handler-bundel file-handler-code]]))

(def webly-routes-api
{"config" {:get :webly/config}
Expand Down Expand Up @@ -33,7 +33,7 @@
#{"r" "bundel"} file-handler-bundel ;["r"] ; first from file, thereafter from resource.
#{"r" "node"} file-handler-nodejs
#{"r" "jarres"} resource-handler ;"r"

"code/" file-handler-code
;[true :webly/not-found] ; not working as we need to process frontend routes also
}]))

Expand Down
3 changes: 3 additions & 0 deletions webly/src/webly/web/resources.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
(modular.webserver.handler.files/->FilesMaybe {:dir "target/webly/public"}))
:cljs (def file-handler-bundel :webly/files-bundel))

#?(:clj (def file-handler-code
(modular.webserver.handler.files/->ResourcesMaybe {:prefix ""}))
:cljs (def file-handler-code :webly/resources-code))



0 comments on commit 8b0b3d4

Please sign in to comment.