Initial commit with cru (no delete) of notes
This commit is contained in:
commit
1e1174f9ca
11 changed files with 244 additions and 0 deletions
19
cmd/server/main.go
Normal file
19
cmd/server/main.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue