Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
resource instead of absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ciocirlan committed Feb 19, 2024
1 parent da77770 commit fbd6edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2024-02-19-websockets-in-http4s.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Routes[F[_]: Files: MonadThrow] extends Http4sDsl[F] {
HttpRoutes.of[F] { case request @ GET -> Root / "chat.html" =>
StaticFile
.fromPath(
fs2.io.file.Path("src/main/resources/chat.html"),
fs2.io.file.Path(getClass.getClassLoader.getResource("chat.html").getFile),
Some(request)
)
.getOrElseF(NotFound())
Expand Down

0 comments on commit fbd6edc

Please sign in to comment.