Add password validation
This commit is contained in:
23
main.go
Normal file
23
main.go
Normal file
@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/fossyy/filekeeper/middleware"
|
||||
"github.com/fossyy/filekeeper/routes"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
serverAddr := fmt.Sprintf("%s:%s", utils.Getenv("SERVER_HOST"), utils.Getenv("SERVER_PORT"))
|
||||
server := http.Server{
|
||||
Addr: serverAddr,
|
||||
Handler: middleware.Handler(routes.SetupRoutes()),
|
||||
}
|
||||
|
||||
fmt.Printf("Listening on http://%s\n", serverAddr)
|
||||
err := server.ListenAndServe()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user