Init
This commit is contained in:
25
main.go
Normal file
25
main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
web "fornaxian.com/pixeldrain-web/init"
|
||||
"fornaxian.com/pixeldrain-web/log"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
// This is just a launcher for the web server. During testing the app would
|
||||
// be directly embedded by another Go project. And when deployed it will run
|
||||
// independently.
|
||||
func main() {
|
||||
r := httprouter.New()
|
||||
|
||||
web.Init(r, "")
|
||||
|
||||
err := http.ListenAndServe(":8081", r)
|
||||
|
||||
if err != nil {
|
||||
log.Error("Can't listen and serve Pixeldrain Web: %v", err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user