Created
June 13, 2017 05:51
-
-
Save undeadops/5cb4668aff626c169d37c9e0be34d7a0 to your computer and use it in GitHub Desktop.
Gin Main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
log.Println("Starting app...") | |
app := gin.Default() | |
app.Use(DummyMiddleware) | |
app.Use(TokenAuthMiddleware()) | |
v1 := app.Group("/v1") | |
{ | |
v1.POST("/alerts", v1Alerts) | |
//v1.GET("/users", GetUsers) | |
//v1.GET("/users/:id", GetUser) | |
//v1.PUT("/users/:id", UpdateUser) | |
//v1.DELETE("/users/:id", DeleteUser) | |
} | |
app.GET("/", index) | |
log.Println("Starting App Server....") | |
app.Run(":8000") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment