Could be cool to have a <paths list>.json file that defines individual paths and it's behavior like:
- Serve a directory content.
- Make a redirection (with HTTP custom status).
- Returns a specific HTTP status code & message.
The JSON file path will be passed as an optional CLI parameter that could overides the -root param behavior, if this is omited, the server will serves the -root directory's content, else this will read, validate and parse every path defined in the file and generate each "reaction" for each.
By this method we could have a powerful and easy to use web server that could works in an quick mode but also in a customizable and fine tuned mode, over HTTP or HTTPS (that is already implemented).
Could be cool to have a
<paths list>.jsonfile that defines individual paths and it's behavior like:The JSON file path will be passed as an optional CLI parameter that could overides the
-rootparam behavior, if this is omited, the server will serves the-rootdirectory's content, else this will read, validate and parse every path defined in the file and generate each "reaction" for each.By this method we could have a powerful and easy to use web server that could works in an quick mode but also in a customizable and fine tuned mode, over HTTP or HTTPS (that is already implemented).