mirror of
https://github.com/zyllian/webdog.git
synced 2025-01-17 19:22:21 -08:00
make serving binding address more easily configurable
This commit is contained in:
parent
190cba1f3a
commit
624853f3ba
2 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ async fn main() -> eyre::Result<()> {
|
|||
Mode::Build => {
|
||||
build(site)?;
|
||||
}
|
||||
Mode::Serve => site.serve().await?,
|
||||
Mode::Serve => site.serve("127.0.0.1:8080").await?,
|
||||
Mode::Now => {
|
||||
let time = OffsetDateTime::now_utc();
|
||||
println!(
|
||||
|
|
|
@ -147,8 +147,8 @@ fn skip_path(builder: &SiteBuilder, path: &Path) -> bool {
|
|||
|
||||
impl Site {
|
||||
/// Serves the site for development. Don't use this in production.
|
||||
pub async fn serve(self) -> eyre::Result<()> {
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], 8080));
|
||||
pub async fn serve(self, addr: &str) -> eyre::Result<()> {
|
||||
let addr: SocketAddr = addr.parse()?;
|
||||
|
||||
let mut builder = SiteBuilder::new(self, true)?.prepare()?;
|
||||
let site = &builder.site;
|
||||
|
|
Loading…
Add table
Reference in a new issue