소스 검색

Update README

Maddie Zhan 5 년 전
부모
커밋
ee58af108a
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      README.md
  2. 2 2
      settings.toml
  3. 1 1
      web/web.go

+ 1 - 1
README.md

@@ -64,7 +64,7 @@ You need Go 1.13+ to compile the binary.
 4. Change `settings.toml` according to your environment:
 
     ```toml
-    # bind address
+    # bind address, use empty string to bind to all interfaces
     bind_address="127.0.0.1"
     # backend listen port, default is 8989
     listen_port=8989

+ 2 - 2
settings.toml

@@ -1,5 +1,5 @@
-# bind address
-bind_address="127.0.0.1"
+# bind address, use empty string to bind to all interfaces
+bind_address=""
 # backend listen port
 listen_port=8989
 # download test chunks

+ 1 - 1
web/web.go

@@ -44,7 +44,7 @@ func ListenAndServe(conf *config.Config) error {
 	r.Use(middleware.NoCache)
 	r.Use(middleware.Logger)
 
-	log.Infof("Starting backend server on port %s", conf.Port)
+	log.Infof("Starting backend server on %s", net.JoinHostPort(conf.BindAddress, conf.Port))
 	r.Get("/*", pages)
 	r.HandleFunc("/empty", empty)
 	r.Get("/garbage", garbage)