mirror of
https://github.com/bitvora/wot-relay.git
synced 2025-04-19 18:21:18 +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
|
||||
DBPath string
|
||||
RelayURL string
|
||||
IndexPath string
|
||||
StaticPath string
|
||||
}
|
||||
|
||||
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")
|
||||
http.ListenAndServe(":3334", relay)
|
||||
@ -125,6 +127,8 @@ func LoadConfig() Config {
|
||||
RelayDescription: getEnv("RELAY_DESCRIPTION"),
|
||||
DBPath: getEnv("DB_PATH"),
|
||||
RelayURL: getEnv("RELAY_URL"),
|
||||
IndexPath: getEnv("INDEX_PATH"),
|
||||
StaticPath: getEnv("STATIC_PATH"),
|
||||
}
|
||||
|
||||
return config
|
||||
|
Loading…
x
Reference in New Issue
Block a user