An ergonomic and elegant framework for creating Gemini servers and SCGI apps without needless bloat
Go to file
Emii Tatsuo 9c999609ef
Accept strings in Document methods
A lot of the time users are using the document, it's in order to dynamically generate a page.  However, when dynamically generating a page, most of the time you're working with String's, not just &str's.  Currently, many Document methods only take an &str, which means that each time you call a method with something like the output from `format!()`, you need to add a `.as_str()`, which adds just a little bit of clutter.

This change makes it so that Document methods that previously took an `&str` can now take an `impl AsRef<str>`, which allows users to pass either an `&str` or a `String`.
2020-11-28 14:47:39 -05:00
examples Add From<Borrow<Document>> to Response 2020-11-20 09:51:37 -05:00
public bump crate version to 0.3.0 2020-11-14 04:50:36 +01:00
src Accept strings in Document methods 2020-11-28 14:47:39 -05:00
.gitignore init 2020-10-31 20:53:03 +01:00
Cargo.toml Add "serve_dir" feature as a reaquired feature for the example of the same name 2020-11-24 16:50:28 -05:00
CHANGELOG.md Updated changelog 2020-11-20 10:05:18 -05:00
README.md add instructions for multiple domains to readme 2020-11-15 20:23:42 +01:00

                     __  __         __
   ____  ____  _____/ /_/ /_  _____/ /_____ ______
  / __ \/ __ \/ ___/ __/ __ \/ ___/ __/ __ `/ ___/
 / / / / /_/ / /  / /_/ / / (__  ) /_/ /_/ / /
/_/ /_/\____/_/   \__/_/ /_/____/\__/\__,_/_/

Usage

Add the latest version of northstar to your Cargo.toml.

Manually

northstar = "0.3.0" # check crates.io for the latest version

Automatically

cargo add northstar

Generating a key & certificate

Run

mkdir cert && cd cert
openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

and enter your domain name (e.g. "localhost" for testing) as Common Name (CN).

Alternatively, if you want to include multiple domains add something like -addext "subjectAltName = DNS:localhost, DNS:example.org".