Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kimi0230/taskrestfulexercise
Implement a RESTful task API application by golang and gin
https://github.com/kimi0230/taskrestfulexercise
gin golang restful-api
Last synced: about 1 month ago
JSON representation
Implement a RESTful task API application by golang and gin
- Host: GitHub
- URL: https://github.com/kimi0230/taskrestfulexercise
- Owner: kimi0230
- Created: 2024-03-29T02:17:57.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-08T10:12:00.000Z (8 months ago)
- Last Synced: 2024-05-08T11:28:27.980Z (8 months ago)
- Topics: gin, golang, restful-api
- Language: Go
- Homepage:
- Size: 192 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task Restful Exercise
Implement a RESTful task API application by `golang` and `gin`
[![demo.mp4](assets/images/demo.png)](https://drive.google.com/file/d/1l5SuhgK_TNOP44ltzwZLiRym5UT2nsJk/view?usp=sharing)
Video: https://drive.google.com/file/d/1l5SuhgK_TNOP44ltzwZLiRym5UT2nsJk/view?usp=sharing## Start Server
```sh
# by makefile
make run# by docker-compose
docker-compose up --build
```![](assets/images/docker.png)
## Local test
```sh
air -c air.toml http --port 5566
```## API Doc
Please refer [docs/api.md](./docs/api.md)![](assets/images/apis.png)
## Information
### MongoDB
Initializing mongo db in docker-compose with init script.
Path : `data/mongo-init.js`#### Root Account
* Account: `root`
* Password: `root`#### User Account
* Account: `user`
* Password: `user_password`## Reference
* [HTTP/Status](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)
* [Initializing mongo db in docker-compose with init script](https://gist.github.com/gbzarelli/c15b607d62fc98ae436564bf8129ea8e)
* [config: spf13/viper](https://github.com/spf13/viper)
* [cosmtrek/air](https://github.com/cosmtrek/air)