urouter/README.md
Ivan Bushchik b7c96c8b4e
0.4.0: Edit alias type
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-12-21 07:00:31 +03:00

717 B

urouter

Static (list of routes read once) http router for routing small domains.

Installation

git clone https://github.com/ivabus/urouter
cd urouter

Edit alias.json (or any other JSON file, check --alias-file option) and cargo run

alias.json example

[
  {
    "uri": "uri",
    "alias": {
      "file":  "somefile"
    }
  },
  {
    "uri": "uri2",
    "alias": {
      "url": "http://example.com"
    }
  },
  {
    "uri": "/",
    "alias": {
      "url": "https://somecoolscript.sh"
    },
    "curl_only": true
  }
]

"curl_only" thing for curl https://url | sh like scripts.

License

The project is licensed under the terms of the MIT license.