fixed main

This commit is contained in:
Kasper Juul Hermansen 2022-10-02 20:53:48 +02:00
parent 02b40a8491
commit d88abefa9a
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -1,34 +1,9 @@
use std::env::{self, current_dir}; use axum::{extract::Extension, http::Method, Router};
use async_graphql_axum::{GraphQLRequest, GraphQLResponse};
use axum::{
extract::Extension,
http::{Method, StatusCode},
response::{Html, IntoResponse},
routing::{get, post},
Json, Router,
};
use axum_extra::extract::{cookie::Key, PrivateCookieJar};
use async_graphql::{
http::{playground_source, GraphQLPlaygroundConfig},
EmptySubscription, Request, Response, Schema,
};
use axum_sessions::{
async_session::MemoryStore,
extractors::{ReadableSession, WritableSession},
SessionLayer,
};
use error::AppError;
use graphql::CibusSchema;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use services::users_service;
use sqlx::PgPool; use sqlx::PgPool;
use std::env::{self, current_dir};
use tower_http::{cors::CorsLayer, trace::TraceLayer}; use tower_http::{cors::CorsLayer, trace::TraceLayer};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
use crate::graphql::{MutationRoot, QueryRoot};
#[tokio::main] #[tokio::main]
async fn main() -> anyhow::Result<()> { async fn main() -> anyhow::Result<()> {
// Environment // Environment