-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
24 lines (19 loc) · 863 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main
import (
"net/http"
"daily_comment/app/controllers"
)
func main() {
http.HandleFunc("/user-list", controllers.HandlerUserList)
http.HandleFunc("/user-form", controllers.HandlerUserForm)
http.HandleFunc("/user-confirm", controllers.HandlerUserConfirm)
http.HandleFunc("/user-registered", controllers.HandlerUserRegistered)
http.HandleFunc("/user-edit", controllers.HandlerUserEdit)
http.HandleFunc("/user-update", controllers.HandlerUserUpdate)
http.HandleFunc("/post-list", controllers.HandlerPostList)
http.HandleFunc("/post-form", controllers.HandlerPostForm)
http.HandleFunc("/post-created", controllers.HandlerPostCreated)
// css・js・イメージファイル等の静的ファイル格納パス
http.Handle("/asset/", http.StripPrefix("/asset/", http.FileServer(http.Dir("app/asset/"))))
http.ListenAndServe(":8080", nil)
}