feat: add dotenvy

This commit is contained in:
trafficlunar 2024-11-29 15:00:21 +00:00
parent dbf616ab18
commit f2145c34b2
5 changed files with 20 additions and 1 deletions

2
.env.example Normal file
View file

@ -0,0 +1,2 @@
# WebSocket URL
WEBSOCKET_URL="ws://localhost:8888/ws/computer"

1
.gitignore vendored
View file

@ -1 +1,2 @@
/target
.env

9
Cargo.lock generated
View file

@ -5,3 +5,12 @@ version = 3
[[package]]
name = "computer"
version = "0.1.0"
dependencies = [
"dotenvy",
]
[[package]]
name = "dotenvy"
version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"

View file

@ -4,3 +4,4 @@ version = "0.1.0"
edition = "2021"
[dependencies]
dotenvy = "0.15.7"

View file

@ -1,3 +1,9 @@
fn main() {
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
dotenvy::dotenv()?;
println!("Hello, world!");
Ok(())
}