I've got a series of paths that look like;
path("slides" / Segment) { segment =>
getFromDirectory(s"${cfg.slidesDir}/$segment")
} ~
path("foo" / Segment) { segment =>
getFromDirectory(s"${cfg.mypyPursDir}/$segment")
} ~
path("foo" / "images" / Segment) { segment =>
getFromDirectory(s"${cfg.mypyPursImageDir}/$segment")
}
Under certain runtime conditions, some of these may not be active (e.g. production versus dev system). How does one enable this conditionality? I can imagine encoding it with if-else if there was a "dummy path" that didn't do anything, for instance.