x
This commit is contained in:
commit
f76cbd9d46
4 changed files with 1904 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
1867
Cargo.lock
generated
Normal file
1867
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
13
Cargo.toml
Normal file
13
Cargo.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
[package]
|
||||
name = "macnickenson"
|
||||
version = "0.1.0"
|
||||
authors = ["Stefan Schwarz <stefan@f2o.io>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
argh = "0.1.3"
|
||||
async-std = { version = "1.6", features = ["attributes"] }
|
||||
sqlx = "0.3"
|
||||
tide = "0.13"
|
23
src/main.rs
Normal file
23
src/main.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
use argh::FromArgs;
|
||||
|
||||
/// Configuration
|
||||
#[derive(FromArgs, Debug)]
|
||||
struct Config {
|
||||
/// listen address
|
||||
#[argh(option, default = "[::1]:8080")]
|
||||
listen: String,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let config: Config = argh::from_env();
|
||||
println!("{:?}, config")
|
||||
}
|
||||
|
||||
//#[async_std::main]
|
||||
//async fn main() -> Result<(), std::io::Error> {
|
||||
// tide::log::start();
|
||||
// let config: Config = argh::from_env();
|
||||
// let mut app = tide::new();
|
||||
//
|
||||
// app.listen(config.listen).await
|
||||
//}
|
Loading…
Add table
Add a link
Reference in a new issue