Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
webuti committed Dec 30, 2021
1 parent 5eebd91 commit 8756608
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
14 changes: 14 additions & 0 deletions gorm-mysql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Example for fiber as a orm to MySQL

A sample program to orm mysql connect

#### Endpoints

| Method | URL |
| ------ | --------- |
| GET | /hello |
| GET | /allbooks |
| GET | /book/:id |
| POST | /book |
| PUT | /book |
| DELETE | /book |
7 changes: 3 additions & 4 deletions gorm-mysql/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ func setUpRoutes(app *fiber.App) {
app.Get("/hello", routes.Hello)
app.Get("/allbooks", routes.AllBooks)
app.Get("/book/:id", routes.GetBook)
app.Post("/addbook", routes.AddBook)
app.Post("/book", routes.Book)
app.Put("/update", routes.Update)
app.Delete("/delete", routes.Delete)
app.Post("/book", routes.AddBook)
app.Put("/book", routes.Update)
app.Delete("/book", routes.Delete)
}

func main() {
Expand Down
File renamed without changes.

0 comments on commit 8756608

Please sign in to comment.