feat: set addr from config

This commit is contained in:
Muyao CHEN 2024-10-02 22:58:20 +02:00
parent 608f435fb1
commit d7eba0a5d6
2 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
addr: :8080
db:
# DB host
host: 127.0.0.1

View File

@ -110,7 +110,7 @@ func run() error {
})
})
r.Run(":8080")
r.Run(viper.GetString("addr"))
return nil
}