Operator
Operator is an experimental web server for static and dynamic content. You give it a directory and it makes a website.
Operator serves static files the way you'd expect, but it can also serve dynamic content generated by handlebars templates and executables.
Installation
Operator is a single self-contained binary. At the moment, the best way to get a binary for your platform is to build one yourself. First install Rust, then:
|
Usage
The CLI has three subcommands:
evalevaluates a handlebars template from STDIN.getrenders content from a content directory.servestarts an HTTP server.
serve is where the real action is, but the other two come in handy at times.
These commands all require a "content directory", which is just a folder where
your website content lives. There are a bunch of example content directories in
samples/.
To learn more, run operator --help or operator <SUBCOMMAND> --help.
Example
Let's start a server for one of the samples:
Open http://localhost:8080 in your browser of choice to see the website!