Web API, Web UI #86

Merged
projectmoon merged 37 commits from web-api into master 2021-07-15 15:04:54 +00:00
2 changed files with 496 additions and 139 deletions
Showing only changes of commit 6dfc9119f7 - Show all commits

628
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -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(
"/", "/",