Cargo fmt
This commit is contained in:
parent
f71490c5fd
commit
8963d21b9c
12
src/main.rs
12
src/main.rs
@ -9,7 +9,9 @@ mod services;
|
|||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() { main_start().await }
|
async fn main() {
|
||||||
|
main_start().await
|
||||||
|
}
|
||||||
|
|
||||||
/// Use this, to get autocomplete. As the tokio::main macro messes with the LSP
|
/// Use this, to get autocomplete. As the tokio::main macro messes with the LSP
|
||||||
async fn main_start() {
|
async fn main_start() {
|
||||||
@ -20,10 +22,10 @@ async fn main_start() {
|
|||||||
Err(error) => {
|
Err(error) => {
|
||||||
println!("Error connecting with the database: {error}");
|
println!("Error connecting with the database: {error}");
|
||||||
panic!();
|
panic!();
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
routes::main_router::start_all_routes(start_time, db_conn)
|
routes::main_router::start_all_routes(start_time, db_conn)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -1,5 +1,4 @@
|
|||||||
|
use std::sync::Arc;
|
||||||
use std::{sync::Arc};
|
|
||||||
|
|
||||||
use actix_cors::Cors;
|
use actix_cors::Cors;
|
||||||
use actix_multipart::form::MultipartFormConfig;
|
use actix_multipart::form::MultipartFormConfig;
|
||||||
@ -31,21 +30,17 @@ pub async fn start_all_routes(start_time: i64, db_conn: Arc<PgPool>) -> Result<(
|
|||||||
.app_data(MultipartFormConfig::default().memory_limit(52_428_800))
|
.app_data(MultipartFormConfig::default().memory_limit(52_428_800))
|
||||||
.service(
|
.service(
|
||||||
web::scope("/api")
|
web::scope("/api")
|
||||||
.service(
|
.service(web::scope("/admin"))
|
||||||
web::scope("/admin")
|
.service(web::scope("/read")),
|
||||||
)
|
|
||||||
.service(
|
|
||||||
web::scope("/read")
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/*.service(
|
/*.service(
|
||||||
spa()
|
spa()
|
||||||
.index_file("./dist/index.html")
|
.index_file("./dist/index.html")
|
||||||
.static_resources_mount("/")
|
.static_resources_mount("/")
|
||||||
.static_resources_location("./dist")
|
.static_resources_location("./dist")
|
||||||
.finish()
|
.finish()
|
||||||
)*/
|
)*/
|
||||||
})
|
})
|
||||||
.bind((HOST_ADDR, HOST_PORT))?
|
.bind((HOST_ADDR, HOST_PORT))?
|
||||||
.run();
|
.run();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
pub mod main_router;
|
|
||||||
pub mod click;
|
pub mod click;
|
||||||
|
pub mod main_router;
|
||||||
pub mod project;
|
pub mod project;
|
||||||
pub mod property;
|
pub mod property;
|
||||||
pub mod realtor;
|
pub mod realtor;
|
||||||
pub mod trackable;
|
pub mod trackable;
|
||||||
pub mod view;
|
pub mod view;
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -3,4 +3,4 @@ pub mod project;
|
|||||||
pub mod property;
|
pub mod property;
|
||||||
pub mod realtor;
|
pub mod realtor;
|
||||||
pub mod trackable;
|
pub mod trackable;
|
||||||
pub mod view;
|
pub mod view;
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub mod macros;
|
pub mod macros;
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub mod s3;
|
pub mod s3;
|
||||||
|
Loading…
Reference in New Issue
Block a user