Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ferrox"
version = "0.4.2"
version = "0.5.0"
edition = "2024"

[dependencies]
Expand All @@ -11,4 +11,5 @@ tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
tokio-rustls = "0.26"
rustls-pemfile = "2.1"
rustls-pemfile = "2.1"
urlencoding = "2"
1 change: 1 addition & 0 deletions ferrox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ server:
http_port: 80
https_port: 443
addr: 0.0.0.0
router: static # static/spa depending on what do you wanna host

# Make sure to create these directories before starting Ferrox
paths:
Expand Down
10 changes: 9 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use serde::Deserialize;
use serde::{Deserialize};
use std::{collections::HashMap, fs};

/// Stores the network address settings used when binding the HTTP server.
Expand All @@ -7,6 +7,14 @@ pub struct ServerConfig {
pub http_port: u16,
pub https_port: u16,
pub addr: String,
pub router: RouterPreset
}

#[derive(Deserialize, Debug, Clone, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum RouterPreset {
Static,
Spa
}

/// Defines the filesystem paths used for static files and log output.
Expand Down
Loading
Loading