1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00

Implement web server starting log

This commit is contained in:
Lukas SP 2020-08-23 16:44:06 +02:00
parent 6d8bd2c2b5
commit d1720c92f2
2 changed files with 4 additions and 3 deletions

View File

@ -20,6 +20,7 @@ func main() {
} }
defer storage.Current.Terminate() defer storage.Current.Terminate()
// Serve the web server // Serve the web resources
log.Println("Serving the web resources...")
panic(web.Serve()) panic(web.Serve())
} }

View File

@ -13,7 +13,7 @@ import (
"strings" "strings"
) )
// Serve serves the web server // Serve serves the web resources
func Serve() error { func Serve() error {
// Create the router // Create the router
router := routing.New() router := routing.New()
@ -55,7 +55,7 @@ func Serve() error {
router.POST("/documents", hastebinSupportHandler) router.POST("/documents", hastebinSupportHandler)
} }
// Serve the web server // Serve the web resources
address := env.Get("WEB_ADDRESS", ":8080") address := env.Get("WEB_ADDRESS", ":8080")
return (&fasthttp.Server{ return (&fasthttp.Server{
Handler: router.Handler, Handler: router.Handler,