mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2025-08-23 14:23:05 +00:00
Support custom sse port (#11)
fix: #10 Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/11
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
var (
|
||||
transport string
|
||||
host string
|
||||
port int
|
||||
token string
|
||||
|
||||
debug bool
|
||||
@@ -37,6 +38,12 @@ func init() {
|
||||
"https://gitea.com",
|
||||
"Gitea host",
|
||||
)
|
||||
flag.IntVar(
|
||||
&port,
|
||||
"port",
|
||||
8080,
|
||||
"sse port",
|
||||
)
|
||||
flag.StringVar(
|
||||
&token,
|
||||
"token",
|
||||
@@ -66,6 +73,8 @@ func init() {
|
||||
flagPkg.Host = "https://gitea.com"
|
||||
}
|
||||
|
||||
flagPkg.Port = port
|
||||
|
||||
flagPkg.Token = token
|
||||
if flagPkg.Token == "" {
|
||||
flagPkg.Token = os.Getenv("GITEA_ACCESS_TOKEN")
|
||||
|
Reference in New Issue
Block a user