https://github.com/rkosegi/db2rest-bridge
Database to REST API bridge
https://github.com/rkosegi/db2rest-bridge
crud-api openapi3 rest-api
Last synced: over 1 year ago
JSON representation
Database to REST API bridge
- Host: GitHub
- URL: https://github.com/rkosegi/db2rest-bridge
- Owner: rkosegi
- License: apache-2.0
- Created: 2024-10-03T06:17:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T10:36:22.000Z (over 1 year ago)
- Last Synced: 2024-10-29T12:33:48.149Z (over 1 year ago)
- Topics: crud-api, openapi3, rest-api
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Database to REST API bridge
This project aims to provide generic REST API to perform simple CRUD operations against database backend.
Currently only MySQL/MariaDB backend is supported.
### Example config
```yaml
---
server:
http_listen_address: 0.0.0.0:22001
cors:
allowed_origins: ["*"]
max_age: 1200
backends:
demo:
create: true # default value of `create` is false
update: true # default value of `update` is false
delete: true # default value of `delete` is false
dsn: "demo:demo@tcp(localhost)/demo?parseTime=true"
demo-ro:
dsn: "demo:demo@tcp(localhost)/demo?parseTime=true"
```
## Security
Security is hard, so I won't even pretend :innocent:.
To secure this thing, use your favorite reverse proxy, such as nginx.
You can limit what CRUD methods are allowed.
By default, anything other than read is **NOT** allowed.