Crates.io | sserver |
lib.rs | sserver |
version | 1.0.3 |
source | src |
created_at | 2020-03-17 19:31:04.387323 |
updated_at | 2020-09-16 13:09:39.593056 |
description | serve your repositories as webpages |
homepage | |
repository | https://github.com/Dawidkubis/sserver |
max_upload_size | |
id | 219923 |
size | 37,740 |
settings.toml
git
rust
- nightly versionmake
- not needed, but simplyfies the compilationcargo build --release
Create a git repository with files to be served in it (html, markdown).
Create a skeleton file inside your repo that has {}
in place of markdown.
Something along the lines of:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
{}
</body>
</html>
Edit the settings.toml
file to make sure Sserver clones your repo with the right branch.
Run Sserver.
To edit your site just edit your repository and your changes will be pulled by Sserver. A additional settings file can be added to your repository to further specify the routes.
Configuration is done in the settings.toml
file.
index
- corresponds to what you get when you GET your site's urlskeleton
- a skeleton html file, required for markdown generationresponse
- optional, a file describing additional settings; note that this implies that a route must be set or your file won't be served.url
- url of your git repobranch
- the branch that should be used[[get]]
uri = "readme"
file = "README.md"
This will respond with the README.md
to GET
to readme
.
Note that readme
!= /readme
since /
implies root.
Sserver is able to serve any of the following file types:
Run with -p <port_number>
to run Sserver on specific port (8000 is the default).