Add ability to specify address in default.project.json (#507)

* Allow for setting the default port in project json

set as
```json
"serveAddress": "0.0.0.0"
```

* Update CHANGELOG.md

* cargo fmt

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
This commit is contained in:
Ashton Miller
2022-04-19 15:54:03 -05:00
committed by GitHub
parent 12370846b4
commit 49f8845105
4 changed files with 19 additions and 2 deletions

View File

@@ -41,7 +41,10 @@ impl ServeCommand {
let session = Arc::new(ServeSession::new(vfs, &project_path)?);
let ip = self.address.unwrap_or(DEFAULT_BIND_ADDRESS.into());
let ip = self
.address
.or_else(|| session.serve_address())
.unwrap_or(DEFAULT_BIND_ADDRESS.into());
let port = self
.port