aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-08-06 11:49:09 +0200
committermetamuffin <metamuffin@disroot.org>2023-08-06 11:49:09 +0200
commitcd366dfdfad18b38c4e542e6db61ced3929d42f9 (patch)
tree9fd47c3964b13a52e09373e3eb8b79225eb56c5e /server
parent98538d1e7220ffb7126c0b5e3d5f9c6c44e4dba9 (diff)
downloadjellything-cd366dfdfad18b38c4e542e6db61ced3929d42f9.tar
jellything-cd366dfdfad18b38c4e542e6db61ced3929d42f9.tar.bz2
jellything-cd366dfdfad18b38c4e542e6db61ced3929d42f9.tar.zst
quick setup command
Diffstat (limited to 'server')
-rw-r--r--server/src/main.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index 3da0e43..b10831f 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -19,8 +19,17 @@ pub mod federation;
pub mod import;
pub mod routes;
-pub static CONF: Lazy<GlobalConfig> =
- Lazy::new(|| serde_json::from_reader(File::open("data/config.json").unwrap()).unwrap());
+pub static CONF: Lazy<GlobalConfig> = Lazy::new(|| {
+ serde_json::from_reader(
+ File::open(
+ std::env::args()
+ .nth(1)
+ .expect("First argument must specify the config.json to use."),
+ )
+ .unwrap(),
+ )
+ .unwrap()
+});
fn main() {
enable_logging();