generated from VLADIMIR/template
up
This commit is contained in:
parent
1a51f10c54
commit
40c36bb784
@ -51,6 +51,7 @@ func main() {
|
||||
}
|
||||
|
||||
clientHost := config.GetHost()
|
||||
adminClientHost := config.GetAdminHost()
|
||||
fileHost := config.GetFileHost()
|
||||
|
||||
cleaner := cleaner.NewCleaner()
|
||||
@ -168,7 +169,7 @@ func main() {
|
||||
muxAdmin.Handle("/", fileServerAdmin)
|
||||
|
||||
// Serve admin web server
|
||||
log.Println("Serving admin web on http://0.0.0.0:8110")
|
||||
log.Printf("Serving admin web on %s\n", adminClientHost)
|
||||
log.Fatalln(http.ListenAndServe(":8110", muxAdmin))
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
115
cmd/evening_detective/static/admin/assets/index-CH9kKe_e.js
Normal file
115
cmd/evening_detective/static/admin/assets/index-CH9kKe_e.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,8 +5,8 @@
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ВД Админка</title>
|
||||
<script type="module" crossorigin src="/assets/index-Bsz6dkXJ.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CPNDoyHf.css">
|
||||
<script type="module" crossorigin src="/assets/index-CH9kKe_e.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-C16dKKOO.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@ -8,6 +8,7 @@ import (
|
||||
|
||||
const (
|
||||
ClientPort = ":8100"
|
||||
AdminClientPort = ":8110"
|
||||
FilePort = ":8120"
|
||||
)
|
||||
|
||||
@ -19,6 +20,18 @@ func GetDBFilepath() string {
|
||||
return getFilepath("DB_FILENAME", "data/db/store.db")
|
||||
}
|
||||
|
||||
func GetAdminHost() string {
|
||||
host := os.Getenv("HOST")
|
||||
if host != "" {
|
||||
return host
|
||||
}
|
||||
ips, err := getLocalIPs()
|
||||
if err != nil || len(ips) == 0 {
|
||||
return "http://127.0.0.1" + AdminClientPort
|
||||
}
|
||||
return "http://" + ips[0] + AdminClientPort
|
||||
}
|
||||
|
||||
func GetHost() string {
|
||||
host := os.Getenv("HOST")
|
||||
if host != "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user