Web API, Web UI #86
File diff suppressed because it is too large
Load Diff
|
@ -125,15 +125,16 @@ fn post_graphql_handler(
|
||||||
|
|
||||||
#[rocket::main]
|
#[rocket::main]
|
||||||
pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
println!("hi");
|
||||||
let filter = if env::var("RUST_LOG").is_ok() {
|
let filter = if env::var("RUST_LOG").is_ok() {
|
||||||
EnvFilter::from_default_env()
|
EnvFilter::from_default_env()
|
||||||
} else {
|
} else {
|
||||||
EnvFilter::new("warp_async")
|
EnvFilter::new("tenebrous_api=info,tonic=info,rocket=info")
|
||||||
};
|
};
|
||||||
|
|
||||||
tracing_subscriber::fmt().with_env_filter(filter).init();
|
tracing_subscriber::fmt().with_env_filter(filter).init();
|
||||||
|
|
||||||
let log = warp::log("warp_server");
|
log::info!("Setting up gRPC connection");
|
||||||
let client = create_client("abc123").await?;
|
let client = create_client("abc123").await?;
|
||||||
|
|
||||||
log::info!("Listening on 127.0.0.1:8080");
|
log::info!("Listening on 127.0.0.1:8080");
|
||||||
|
@ -142,7 +143,7 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
};
|
};
|
||||||
|
|
||||||
Rocket::build()
|
Rocket::build()
|
||||||
.manage(client)
|
.manage(context)
|
||||||
.manage(schema())
|
.manage(schema())
|
||||||
.mount(
|
.mount(
|
||||||
"/",
|
"/",
|
||||||
|
|
Loading…
Reference in New Issue