Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chayuto/go-iot-api
go-iot-api
https://github.com/chayuto/go-iot-api
api go golang
Last synced: 14 days ago
JSON representation
go-iot-api
- Host: GitHub
- URL: https://github.com/chayuto/go-iot-api
- Owner: chayuto
- Created: 2022-09-10T08:49:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-10T12:52:55.000Z (over 2 years ago)
- Last Synced: 2024-11-07T10:28:59.642Z (2 months ago)
- Topics: api, go, golang
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-iot-api
basic API server with GO
github.com/chayuto/go-iot-api
- Gin
- Docker
- Docker compose```
go mod init go-iot-api
go run .\main.go
go get -u github.com/gin-gonic/gingo get -u ./...
go mod tidy
```## docker stuff
```
docker build --tag go-iot-api .
docker run --publish 8080:8080 go-iot-apidocker run -d --publish 8080:8080 go-iot-api
docker ps
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)docker rmi $(docker images -q)
docker compose up --build --remove-orphans
docker compose up --build --remove-orphans -d
docker compose down
```REF:
- https://blog.logrocket.com/how-to-build-a-rest-api-with-golang-using-gin-and-gorm/
- https://github.com/rahmanfadhil/gin-bookstore