mirror of
https://github.com/YGGverse/mb.git
synced 2026-03-31 09:05:28 +00:00
Simple, js-less micro-blogging platform written in Rust
https://crates.io/crates/mb
| .github | ||
| public/theme | ||
| src | ||
| templates | ||
| .gitignore | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
mb
Simple, js-less micro-blogging platform written in Rust.
It uses the Rocket framework and redb database for serving messages.
Demo
Install
git clone https://github.com/YGGverse/mb.git && cd mbcargo build --releasesudo install target/release/mb /usr/local/bin/mb
Usage
systemd
[Unit]
After=network.target
Wants=network.target
[Service]
Type=simple
User=mb
Group=mb
WorkingDirectory=/path/to/public-and-templates
ExecStart=/usr/local/bin/mb --token=strong_key
StandardOutput=file:///path/to/debug.log
StandardError=file:///path/to/error.log
[Install]
WantedBy=multi-user.target
- the
databasefile will be created if it does not already exist at the given location - the
tokenvalue is the access key to create and delete your messages (the authentication feature has not yet been implemented) - copy
templatesandpublicfolders toWorkingDirectorydestination (see Rocket deployment for details)
nginx
server {
listen 80;
location ~* \.(jpg|jpeg|png|gif|ico|svg|css|js) {
expires 30d;
add_header Cache-Control "public, max-age=2592000";
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}