Convert to go
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
_ "list_app/db"
|
||||
|
||||
"list_app/controllers"
|
||||
"list_app/routes"
|
||||
)
|
||||
|
||||
const hostname = "127.0.0.1"
|
||||
const httpPort = "4080"
|
||||
|
||||
func main() {
|
||||
mux := routes.New()
|
||||
|
||||
go controllers.CheckImages()
|
||||
|
||||
log.Printf("Server running at http://%s:%s/\n", hostname, httpPort)
|
||||
if err := http.ListenAndServe(hostname+":"+httpPort, mux); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user