This is a key-value storage using Tarantool
This project is powered by Lua. Also used:
- Nginx
- Docker
- Tarantool
Known limitations: https is not supported, because http.client does not support it.
Path | Method | Body (json) | Description |
---|---|---|---|
/kv | POST | {"key": "Your key", "value": some json } |
Add a new tuple in database |
/kv/:key | GET | Select value by key | |
/kv/:key | DELETE | Delete tuple if key was in the database | |
/kv/:key | PUT | { "value": some json} |
Update new pair if the key was in the database |
curl -d '{"key":"Hello", "value": "World"}' -H "Content-Type: application/json" -X POST http://kv-storage-tarantool.site/kv
curl -X GET http://kv-storage-tarantool.site/kv/Hello
curl -d '{"value": "!"}' -H "Content-Type: application/json" -X PUT http://kv-storage-tarantool.site/kv/Hello
curl -X DELETE http://kv-storage-tarantool.site/kv/Hello
- Clone this repository
- If you have docker-compose installed you can simply run:
cd kv-storage-tarantool
docker-compose build
docker-compose up -d
*Note: tests will run automatically
- Add more tests
- add dockerfils & nginx