Skip to content

Commit

Permalink
also support multiple world addresses in storage_init
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar Oostendorp committed May 11, 2024
1 parent b1df7be commit 00fb84f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,14 @@ mod utils;
async fn main() {
let config = Config::new();

if config.server.prod {
Command::new("npx")
.args(vec!["import-meta-env", "-x", ".env.example", "-p", KEIKO_INDEX])
.output()
.expect("Failed to build dashboard");
}


let world_storage_dir = format!("storage/{}/", config.katana.world_address);

if !Path::new(&world_storage_dir).exists() || fs::read_dir(&world_storage_dir).unwrap().next().is_none() {
fs::create_dir_all("storage").unwrap();
Command::new("cp")
.arg("-r")
.arg("storage_init/")
.arg(format!("storage_init/{}/", config.katana.world_address))
.arg(&world_storage_dir)
.status()
.unwrap();
Expand Down

0 comments on commit 00fb84f

Please sign in to comment.