0.5.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseDefine routes on runtime and execute scripts associated with each route. The server supports fetching data, for proxy purposes.
// the index route
index {
text(":3\nwelcome to the root")
}
// this is /hello
hello {
text("Hello World!")
}
// get data from another website, then return as json
tests/fetch {
json(http::get("https://httpbin.org/json").json())
}
// route placeholders
#[route("/example/{id}")]
example(id) {
text("base: " + id)
}For more syntax, check out tests/app.rt
# Start the server
script start <config_path> # (default config.toml)For more commands, check out script --help
Pre-built binaries for Linux, MacOS, and Windows can be found on the releases page.
Install from crates.io using cargo install script
cargo
cargo build --release