Created
October 18, 2020 05:33
-
-
Save LironHazan/00089100c4e10c245986f82bd5f35bec to your computer and use it in GitHub Desktop.
snippet 6 for post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Opens chrome once the server starts | |
async fn open_web_app(url: &str) -> () { | |
use std::process::Command; | |
let mut cmd = Command::new("open"); | |
cmd.arg("-a") | |
.arg("Google Chrome") | |
.arg(format!("http://{}", url)) | |
.spawn() | |
.expect("failed to spawn child"); | |
println!("{}", url) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment