Listen on second port and redirect to main

This commit is contained in:
Bel LaPointe
2020-02-14 14:57:26 -07:00
parent c4c37068f3
commit 61811e8e61
4 changed files with 47 additions and 10 deletions

View File

@@ -9,10 +9,12 @@ import (
func New() *Server {
port := config.GetPort()
altport := config.GetAltPort()
r, b := config.GetRate()
return &Server{
db: storage.NewMap(),
addr: port,
altaddr: altport,
limiter: rate.NewLimiter(rate.Limit(r), b),
}
}