-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
39 lines (28 loc) · 910 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"github.com/gin-gonic/gin"
"github.com/mansikalra23/Project/Company/controllers"
"github.com/mansikalra23/Project/Company/models"
)
var r *gin.Engine
func main() {
r = gin.Default()
// Connect to database
models.ConnectDatabase()
r.LoadHTMLGlob("templates/*")
r.GET("/", controllers.Hello)
r.GET("/form", controllers.Form)
r.POST("/submit", controllers.Submit)
r.GET("/register", controllers.Register)
r.POST("/registered", controllers.Registered)
r.GET("/password", controllers.Password)
r.POST("/trainer", controllers.Trainer)
r.GET("/update", controllers.Update)
r.POST("/updated", controllers.Updated)
r.GET("/delete", controllers.Delete)
r.POST("/deleted", controllers.Deleted)
r.GET("/show", controllers.Show)
r.GET("/email", controllers.Email)
r.POST("/showtrainee", controllers.ShowTrainee)
r.Run(":8000")
}