script

Barebones http scripting

Latest version: 0.5.0 registry icon
Maintenance score
0
Safety score
0
Popularity score
70
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.5.0 0 0 0 0 0
0.4.0 0 0 0 0 0
0.3.1 0 0 0 0 0
0.3.0 0 0 0 0 0
0.2.4 0 0 0 0 0
0.2.3 0 0 0 0 0
0.2.2 0 0 0 0 0
0.2.1 0 0 0 0 0
0.2.0 0 0 0 0 0
0.1.0 0 0 0 0 0

Stability
Latest release:

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

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



barebones http scripting

Overview

Define routes on runtime and execute scripts associated with each route. The server supports fetching data, for proxy purposes.

Usage

// 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

Installation

Pre-built binaries for Linux, MacOS, and Windows can be found on the releases page.

Install from crates.io using cargo install script

Building

  • Clone the project
  • Open a terminal in the project folder
  • Check if you have cargo (Rust's package manager) installed, just type in cargo
  • If cargo is installed, run cargo build --release