Move server stuff into API folder

This commit is contained in:
Michael Mikovsky
2025-11-29 14:10:05 -07:00
parent a10bdce38f
commit c83e2f1527
8 changed files with 42 additions and 41 deletions
+3 -20
View File
@@ -1,21 +1,4 @@
#![macro_use]
// #![macro_use]
use chrono::Duration;
use jsonwebtoken::{DecodingKey, EncodingKey};
use static_init::dynamic;
extern crate unshell_lib;
pub mod app;
mod auth;
mod structs;
mod userdata;
static EXPIRE_DURATION: Duration = Duration::seconds(10);
#[dynamic]
static JWT_SECRET: String = std::env::var("JWT_SECRET").expect("JWT_SECRET must be set");
#[dynamic]
static JWT_ENCODING_KEY: EncodingKey = EncodingKey::from_secret(JWT_SECRET.as_bytes());
#[dynamic]
static JWT_DECODING_KEY: DecodingKey = DecodingKey::from_secret(JWT_SECRET.as_bytes());
mod api;
pub use api::app::start_api;