forked from TripwireTeam/tripwire
quick port option
This commit is contained in:
parent
77ce652e28
commit
82c228e306
1 changed files with 9 additions and 2 deletions
11
main.go
11
main.go
|
@ -4,6 +4,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
@ -43,8 +44,14 @@ func handleRequests() {
|
|||
registerSessionEndpoints(r)
|
||||
registerWebEndpoints(r)
|
||||
|
||||
log.Println("Tripwire started.")
|
||||
log.Fatal(http.ListenAndServe(":10000", r))
|
||||
splitUrl := strings.Split(config.BaseUrl, ":")
|
||||
port := "80"
|
||||
if len(port) > 1 {
|
||||
port = splitUrl[1]
|
||||
}
|
||||
|
||||
log.Printf("Tripwire started. Listening on port %v.\n", port)
|
||||
log.Fatal(http.ListenAndServe(":"+port, r))
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
Loading…
Reference in a new issue