crapi
๐ Crapi
Crapi [/หkrapi/] exposes a JSON or YAML file via a simple HTTP API for use as a basic read-only key-value store. It might be useful for serving up static data that doesn't change very often.
Also, it's written in Crystal! Yay!
โ ๏ธ Very WIP. Restructure and tests to follow.
Installation
TODO.
- Grab the binary
- ???
- Maybe profit
Usage
With a data.yml
file in the current working directory, run crapi:
crapi
Your yaml will be exposed on port 3000. For example, with this yaml file:
foo:
bar:
baz: Hi ma
You'll receive this response:
> curl localhost:3000/foo/bar/baz
{"data":"Hi ma"}โ
If the key is missing, the server simply returns a 404.
Development
- Have crystal
- TODO
Contributing
- Fork it (https://github.com/shkm/crapi/fork)
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Commit your changes (
git commit -am 'feat: add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create a new Pull Request
Contributors
- Jamie Schembri - creator and maintainer
Repository
crapi
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- about 2 years ago
- December 22, 2022
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 08:06:56 GMT
Languages