basic config system
This commit is contained in:
parent
77ad597963
commit
fa1d23cb3e
8 changed files with 78 additions and 10 deletions
20
src/main.rs
20
src/main.rs
|
@ -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
|
||||
])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue