http.sh/src/route.sh
2021-02-28 01:05:24 +01:00

10 lines
186 B
Bash
Executable file

#!/bin/bash
# route.sh - basic router stub
# router(uri, path)
function router() {
route+=("$1")
route+=("$(sed -E 's/:[A-Za-z0-9]+/[A-Za-z0-9.,%:-_]+/g' <<< "$1")")
route+=("$2")
}