feat: open browser when start server (#2)
This commit is contained in:
parent
ea2e4776c4
commit
9ddce13cf6
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
import (
|
||||
"github.com/ihexxa/quickshare/server/apis"
|
||||
"github.com/ihexxa/quickshare/server/libs/cfg"
|
||||
"github.com/skratchdot/open-golang/open"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -36,5 +37,9 @@ func main() {
|
|||
}
|
||||
|
||||
log.Printf("quickshare starts @ %s:%d", config.HostName, config.Port)
|
||||
err := open.Start(fmt.Sprintf("http://%s:%d", config.HostName, config.Port))
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
log.Fatal(server.ListenAndServe())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue