Simple 69-line program in Rust that dynamically sets up a website.
Go to file
SadlyNotSappho 865ee8487f add readme 2023-05-05 16:57:53 -07:00
src add very basic logging 2023-05-05 16:48:13 -07:00
.env.example first commit 2023-04-28 12:58:40 -07:00
.gitignore first commit 2023-04-28 12:58:40 -07:00
Cargo.lock add dockerfile 2023-05-05 12:47:44 -07:00
Cargo.toml change project name from webserver to dynamic-webserver 2023-05-02 15:24:36 -07:00
Dockerfile add dockerfile 2023-05-05 12:47:44 -07:00
README.md add readme 2023-05-05 16:57:53 -07:00

README.md

dynamic-webserver

Simple 69-line program written in Rust that dynamically sets up a website. Basically everything it does is configurable - which isn't much, it just looks at a directory and sets up website subdirs based on the folders in the directory.

/srv/website
root
about
blog

/srv/website/root
index.html

/srv/website/about
index.html

/srv/website/blog
index.html
script.js

With this setup of folders, and the below ENV variables, it'll set up a website with the following subdirs. localhost:8080 (showing you /srv/website/root/index.html), localhost:8080/about (showing you /srv/website/about/index.html), and localhost:8080/blog (showing you, you guessed it, /srv/website/blog/index.html)

DIRS_LOC=/srv/website
INDEX_PATH=/
ROOT_NAME=root
IP_ADDR=127.0.0.1:8080