https://github.com/elgopher/deebee-loans
Example web application for taking and paying off loans leveraging DeeBee as a persistent store
https://github.com/elgopher/deebee-loans
deebee example go loans
Last synced: 28 days ago
JSON representation
Example web application for taking and paying off loans leveraging DeeBee as a persistent store
- Host: GitHub
- URL: https://github.com/elgopher/deebee-loans
- Owner: elgopher
- License: mit
- Created: 2021-04-10T16:30:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-27T10:54:53.000Z (over 4 years ago)
- Last Synced: 2026-04-25T19:32:34.608Z (about 2 months ago)
- Topics: deebee, example, go, loans
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deebee-loans
This is a very simple (yet practical) example of web application
leveraging [DeeBee](https://github.com/elgopher/deebee) as a persistent store.
The whole state of application is held in RAM. Cyclically and during application shutdown the state is persisted to disk
using DeeBee store.
When application is starting, state is restored and loaded again into memory.
The state is also replicated once per hour to a second directory (which can be an NFS file system).
## Disclaimer
Please note that application is lacking in multiple areas: security, input validation, testing etc. I wanted to focus
only on those topics related to storing application state.
## Web API
### Take a Loan
```shell
curl "http://localhost:8080/take?user=john&amount=1600&term=30"
```
### Pay off the loan
```shell
curl "http://localhost:8080/pay?user=john&amount=600"
```