Update README.md
This commit is contained in:
parent
0b92868bfe
commit
74917c672f
2 changed files with 10 additions and 3 deletions
|
@ -105,6 +105,11 @@ Specify a custom address for the server by passing the `-a` or `--address` argum
|
|||
libreddit --address=0.0.0.0:8111
|
||||
```
|
||||
|
||||
To disable the media proxy built into Libreddit, run:
|
||||
```
|
||||
libreddit --no-default-features
|
||||
```
|
||||
|
||||
## Building from Source
|
||||
|
||||
```
|
||||
|
|
|
@ -32,11 +32,13 @@ async fn main() -> std::io::Result<()> {
|
|||
let mut address = "0.0.0.0:8080".to_string();
|
||||
|
||||
if args.len() > 1 {
|
||||
if args[1].starts_with("--address=") || args[1].starts_with("-a=") {
|
||||
let split: Vec<&str> = args[1].split("=").collect();
|
||||
for arg in args {
|
||||
if arg.starts_with("--address=") || arg.starts_with("-a=") {
|
||||
let split: Vec<&str> = arg.split("=").collect();
|
||||
address = split[1].to_string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// start http server
|
||||
println!("Running Libreddit on {}!", address.clone());
|
||||
|
|
Loading…
Reference in a new issue