mirror of
https://github.com/MADTeacher/go_basics.git
synced 2025-11-29 05:36:55 +02:00
21 lines
307 B
Go
21 lines
307 B
Go
package main
|
|
|
|
import (
|
|
"golang/todo-service/db"
|
|
"golang/todo-service/service"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
const PORT = "8080"
|
|
|
|
func main() {
|
|
|
|
rep := db.NewSQLiteRepository()
|
|
defer rep.Close()
|
|
|
|
router := service.NewRouter(rep)
|
|
log.Printf("Server started")
|
|
log.Fatal(http.ListenAndServe(":"+PORT, router))
|
|
}
|