Skip to content

Add utility to convert path segments to a FS2 Path #27#40

Merged
noelwelsh merged 1 commit intocreativescala:mainfrom
Babali42:feature/assetpath-to-fs2path
Feb 4, 2026
Merged

Add utility to convert path segments to a FS2 Path #27#40
noelwelsh merged 1 commit intocreativescala:mainfrom
Babali42:feature/assetpath-to-fs2path

Conversation

@Babali42
Copy link
Contributor

@Babali42 Babali42 commented Jan 29, 2026

#27

The handling of Static directory is simplified from this

  val staticDirectoryRoute =
    Route(
      Request.get(Path / "kroptest" / "assets2" / Param.string),
      Response.StaticDirectory(Fs2Path("resources/kroptest/assets"))
    ).handle(Fs2Path(_))

To this

  val staticDirectoryRoute =
    Route(
      Request.get(Path / "kroptest" / "assets2" / AssetPath.fs2Path),
      Response.StaticDirectory(Fs2Path("resources/kroptest/assets"))
    ).passthrough

@Babali42 Babali42 force-pushed the feature/assetpath-to-fs2path branch 4 times, most recently from 714bf06 to ef477e7 Compare January 29, 2026 10:57
@Babali42 Babali42 force-pushed the feature/assetpath-to-fs2path branch from ef477e7 to 45f02ac Compare February 1, 2026 08:37
@Babali42 Babali42 force-pushed the feature/assetpath-to-fs2path branch from 45f02ac to aa9ef3c Compare February 1, 2026 08:46
@noelwelsh noelwelsh merged commit fc2e855 into creativescala:main Feb 4, 2026
4 checks passed
@noelwelsh
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants