basic config system

This commit is contained in:
Reid 2023-08-28 16:30:10 -07:00
parent 77ad597963
commit fa1d23cb3e
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
8 changed files with 78 additions and 10 deletions

View file

@ -1,4 +1,5 @@
#![feature(decl_macro)]
#![feature(lazy_cell)]
#[macro_use] extern crate rocket;
@ -11,17 +12,22 @@ use helpers::*;
mod endpoints;
use endpoints::*;
mod config;
use config::*;
#[get("/")]
fn index() -> String {
return String::from("index | coming soon to a localhost:8000 near u");
return String::from("gdps-server | https://git.reidlab.online/reidlab/gdps-server");
}
#[launch]
fn rocket() -> _ {
rocket::build().mount("/", routes![
index,
endpoints::accounts::login_account::login_account,
endpoints::accounts::register_account::register_account
])
rocket::build()
.configure(rocket::Config::figment().merge(("port", CONFIG.general.port)))
.mount("/", routes![
index,
endpoints::accounts::login_account::login_account,
endpoints::accounts::register_account::register_account
])
}