mirror of
https://github.com/bitvora/wot-relay.git
synced 2025-06-06 18:31:05 +00:00
absolute paths
This commit is contained in:
parent
f3ed790a96
commit
bd451386dc
6
main.go
6
main.go
@ -22,6 +22,8 @@ type Config struct {
|
|||||||
RelayDescription string
|
RelayDescription string
|
||||||
DBPath string
|
DBPath string
|
||||||
RelayURL string
|
RelayURL string
|
||||||
|
IndexPath string
|
||||||
|
StaticPath string
|
||||||
}
|
}
|
||||||
|
|
||||||
var archivePool *nostr.SimplePool
|
var archivePool *nostr.SimplePool
|
||||||
@ -107,7 +109,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("/favicon.ico", http.StripPrefix("/", http.FileServer(http.Dir("templates/static"))))
|
mux.Handle("/favicon.ico", http.StripPrefix("/", http.FileServer(http.Dir(config.StaticPath))))
|
||||||
|
|
||||||
fmt.Println("running on :3334")
|
fmt.Println("running on :3334")
|
||||||
http.ListenAndServe(":3334", relay)
|
http.ListenAndServe(":3334", relay)
|
||||||
@ -125,6 +127,8 @@ func LoadConfig() Config {
|
|||||||
RelayDescription: getEnv("RELAY_DESCRIPTION"),
|
RelayDescription: getEnv("RELAY_DESCRIPTION"),
|
||||||
DBPath: getEnv("DB_PATH"),
|
DBPath: getEnv("DB_PATH"),
|
||||||
RelayURL: getEnv("RELAY_URL"),
|
RelayURL: getEnv("RELAY_URL"),
|
||||||
|
IndexPath: getEnv("INDEX_PATH"),
|
||||||
|
StaticPath: getEnv("STATIC_PATH"),
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user