-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
41 lines (38 loc) · 1.14 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"net/http"
"nuobelcloud/controllers"
)
//入口
func main() {
//静态文件
http.Handle("/static/", http.FileServer(http.Dir("")))
//登录
http.HandleFunc("/", controllers.OnHome)
http.HandleFunc("/nuobel", controllers.OnIndex)
//关于我
http.HandleFunc("/aboutme", controllers.OnAboutme)
http.HandleFunc("/nuobel/login", controllers.OnLogin)
//register
http.HandleFunc("/nuobel/register", controllers.OnRegister)
//index
http.HandleFunc("/nuobel/index", controllers.OnIndex)
//getuserinfo
http.HandleFunc("/nuobel/getuserinfo", controllers.OnGetUserInfo)
//getfilelist
http.HandleFunc("/nuobel/getfilelist", controllers.OnGetFileList)
//uploadfile
http.HandleFunc("/nuobel/uploadfile", controllers.OnUploadFile)
//download
http.HandleFunc("/downloadfile", controllers.OnDownloadFile)
//deletefile
http.HandleFunc("/nuobel/deletefile", controllers.OnDeleteFile)
//makedir
http.HandleFunc("/nuobel/makedir", controllers.OnMakeDir)
//exit
http.HandleFunc("/nuobel/exit", controllers.OnExit)
//rename
http.HandleFunc("/nuobel/rename", controllers.OnRenameFileHandle)
//监听
http.ListenAndServe(":8080", nil)
}