@@ -31,6 +31,7 @@ type Config struct {
31
31
RelayDescription string
32
32
DBPath string
33
33
RelayURL string
34
+ RelayPort string
34
35
WebPath string
35
36
RefreshInterval int
36
37
MinFollowers int
@@ -161,12 +162,14 @@ func main() {
161
162
RelayPubkey string
162
163
RelayDescription string
163
164
RelayURL string
165
+ RelayPort string
164
166
RelayOwner string
165
167
}{
166
168
RelayName : config .RelayName ,
167
169
RelayPubkey : config .RelayPubkey ,
168
170
RelayDescription : config .RelayDescription ,
169
171
RelayURL : config .RelayURL ,
172
+ RelayPort : config .RelayPort ,
170
173
RelayOwner : config .OwnerPubkey ,
171
174
}
172
175
err := tmpl .Execute (w , data )
@@ -175,8 +178,8 @@ func main() {
175
178
}
176
179
})
177
180
178
- log .Println ("🎉 Relay running on port :3334" )
179
- err := http .ListenAndServe (":3334" , relay )
181
+ log .Println ("🎉 Relay running on port" , config . RelayPort )
182
+ err := http .ListenAndServe (":" + config . RelayPort , relay )
180
183
if err != nil {
181
184
log .Fatal (err )
182
185
}
@@ -211,6 +214,7 @@ func LoadConfig() Config {
211
214
RelayIcon : getEnv ("RELAY_ICON" ),
212
215
DBPath : getEnv ("DB_PATH" ),
213
216
RelayURL : getEnv ("RELAY_URL" ),
217
+ RelayPort : getEnv ("RELAY_PORT" ),
214
218
WebPath : getEnv ("WEB_PATH" ),
215
219
RefreshInterval : refreshInterval ,
216
220
MinFollowers : minFollowers ,
0 commit comments