https://github.com/oglinuk/restful-go
An example implementation of an enterprise-level REST interface in Golang using primarily the standard library, Docker, and Docker Compose.
https://github.com/oglinuk/restful-go
go golang rest-api
Last synced: about 1 year ago
JSON representation
An example implementation of an enterprise-level REST interface in Golang using primarily the standard library, Docker, and Docker Compose.
- Host: GitHub
- URL: https://github.com/oglinuk/restful-go
- Owner: oglinuk
- Created: 2021-10-11T19:34:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-06T21:33:04.000Z (over 4 years ago)
- Last Synced: 2025-05-29T17:58:22.364Z (about 1 year ago)
- Topics: go, golang, rest-api
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# REST API in Golang
This is an example REST API implementation using primarily the standard
library, Docker, and Docker Compose. The exceptions are as follows.
```
github.com/go-chi/chi/v5 v5.0.7 (for the router)
github.com/go-chi/cors v1.2.0 (for CORS)
github.com/mattn/go-sqlite3 v1.14.8 (for the database)
github.com/stretchr/testify v1.7.0 (for testing)
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b (for configuration)
```
## Getting Started
`./init app`
`./init clean` to remove `cfg.yaml`, `library.db` and binaries
### With `docker`
`./init dapi && ./init ui`
`./init dclean` to stop/rm the docker container
### With `docker-compose`
`docker-compose up --build` || `./init dcompose`
Once both are running go to [`localhost:9042`](http://localhost:9042). If
you want to access the page from other devices on the network, goto
[`localhost:9001`](http://localhost:9001) and replace `localhost` with
the `ip` given as the response.
## TODO
* [X] Implement simple CRUD operations
* [X] Insert
* [X] SelectAll
* [X] Select
* [X] Update
* [X] Delete
* [X] [Code Review](docs/code-reviews/1642914462)
* [ ] Implement API tokens using JWT
* [ ] Implement a database abstraction layer
* [ ] Add CI/CD pipeline
* [ ] Add `ARCHITECTURE.md`