Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marwenbhriz/go-rest-api
https://github.com/marwenbhriz/go-rest-api
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/marwenbhriz/go-rest-api
- Owner: marwenbhriz
- Created: 2024-06-02T21:23:12.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-02T21:41:26.000Z (6 months ago)
- Last Synced: 2024-06-19T03:15:16.011Z (5 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
module cmd/go-api-sample-todo
go 1.22.3
1. run mysql db
docker run --name product-db -e MYSQL_ROOT_PASSWORD=root -d -p 3306:3306 mysql:latest
docker exec -it product-db bash
mysql -u root -proot
CREATE DATABASE products;go mod init github.com/marwenbhriz/go-rest-api
go get .
go get github.com/marwenbhriz/go-rest-api/controllers/productcontroller
go get github.com/marwenbhriz/go-rest-api/modelsgo get gorm.io/driver/mysql