started with using surealdb

This commit is contained in:
Sebastian Moser
2022-09-18 21:02:42 +02:00
parent 463e58691b
commit 87ebad4bce
4 changed files with 2010 additions and 37 deletions

View File

@@ -73,16 +73,21 @@ pub fn run_server(args: Vec<String>) {
//println!("{}", err.message);
//}
// get itemstore
let itemstore = crate::server::itemstore::itemstore::new(mize_folder + "/db");
//run the webserver
warp_server();
warp_server(mize_folder);
}
#[tokio::main]
async fn warp_server() {
async fn warp_server(mize_folder: String) {
/*
*
*
@@ -92,6 +97,10 @@ async fn warp_server() {
//## any number (with "-" in them) is interpreted as an item id
//## $api/socket/id
//## $api/rest/
// get itemstore
let itemstore = crate::server::itemstore::itemstore::new(mize_folder + "/db").await;
println!("haöasldjkfsdfi");
let mut clients: Arc<Mutex<Vec<Client>>> = Arc::new(Mutex::new(Vec::new()));