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:
parent
6d8bd2c2b5
commit
d1720c92f2
@ -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())
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user