move folder

This commit is contained in:
2022-01-02 23:46:08 +01:00
parent 835f7df0f6
commit a0732a4593
58 changed files with 73 additions and 83 deletions

27
backend/src/main.rs Normal file
View File

@@ -0,0 +1,27 @@
use actix_web::{middleware, web, App, HttpServer};
use dotenv::dotenv;
#[macro_use]
extern crate lazy_static;
mod client;
mod note;
mod size;
mod store;
#[actix_web::main]
async fn main() -> std::io::Result<()> {
dotenv().ok();
return HttpServer::new(|| {
App::new()
.wrap(middleware::Compress::default())
.wrap(middleware::DefaultHeaders::default())
.configure(size::init)
.configure(note::init)
.configure(client::init)
.default_service(web::resource("").route(web::get().to(client::fallback_fn)))
})
.bind("0.0.0.0:5000")?
.run()
.await;
}