26 lines
392 B
Go
26 lines
392 B
Go
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)
|
|
}
|
|
}
|