parent
960a5a768b
commit
7777e3bccd
2 changed files with 20 additions and 0 deletions
|
@ -3,6 +3,7 @@ use super::log;
|
|||
use crate::cnf::LOGO;
|
||||
use crate::dbs;
|
||||
use crate::err::Error;
|
||||
use crate::iam;
|
||||
use crate::net;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -20,6 +21,8 @@ pub async fn init(matches: &clap::ArgMatches) -> Result<(), Error> {
|
|||
println!("{}", LOGO);
|
||||
// Setup the cli options
|
||||
config::init(matches);
|
||||
// Initiate master auth
|
||||
iam::init().await?;
|
||||
// Start the kvs server
|
||||
dbs::init().await?;
|
||||
// Start the web server
|
||||
|
|
|
@ -3,3 +3,20 @@ pub mod signin;
|
|||
pub mod signup;
|
||||
pub mod token;
|
||||
pub mod verify;
|
||||
|
||||
use crate::cli::CF;
|
||||
use crate::err::Error;
|
||||
|
||||
const LOG: &str = "surrealdb::iam";
|
||||
|
||||
pub async fn init() -> Result<(), Error> {
|
||||
// Get local copy of options
|
||||
let opt = CF.get().unwrap();
|
||||
// Log authentication options
|
||||
match opt.pass {
|
||||
Some(_) => info!(target: LOG, "Root authentication is enabled"),
|
||||
None => info!(target: LOG, "Root authentication is disabled"),
|
||||
};
|
||||
// All ok
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue