https://github.com/shkm/crapi
๐ A HTTP API for your JSON/YAML files
https://github.com/shkm/crapi
crystal json key-value-store yaml
Last synced: about 1 year ago
JSON representation
๐ A HTTP API for your JSON/YAML files
- Host: GitHub
- URL: https://github.com/shkm/crapi
- Owner: shkm
- License: mit
- Created: 2022-12-22T15:10:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-22T15:49:43.000Z (over 3 years ago)
- Last Synced: 2025-03-15T23:53:03.412Z (about 1 year ago)
- Topics: crystal, json, key-value-store, yaml
- Language: Crystal
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ 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.
1. Grab the binary
2. ???
3. 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:
```yaml
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
1. Have crystal
2. TODO
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b feature/my-new-feature`)
3. Commit your changes (`git commit -am 'feat: add some feature'`)
4. Push to the branch (`git push origin feature/my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Jamie Schembri](https://github.com/shkm) - creator and maintainer