20 lines
391 B
Go
20 lines
391 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"log"
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"gitea.gwairfelin.com/max/gonotes/internal/conf"
|
||
|
|
"gitea.gwairfelin.com/max/gonotes/internal/notes/views"
|
||
|
|
)
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
conf.LoadConfig("./conf.toml")
|
||
|
|
|
||
|
|
router := http.NewServeMux()
|
||
|
|
notesRouter := views.GetRoutes("/notes")
|
||
|
|
|
||
|
|
router.Handle("/notes/", http.StripPrefix("/notes", notesRouter))
|
||
|
|
log.Fatal(http.ListenAndServe(":8080", router))
|
||
|
|
}
|