pebble
pebble - cloud-sqlite
Simple crystal-lang based dockerized web server allowing to store and read into a local sqlite database.
Build
shards install
crystal build server.cr --release
Boot
DATABASE_PATH=./mydb.db ./server -p 3000
Mutate the database
curl -H "Content-Type: application/json" \
--request POST \
--data '{"type":"mutation","query":"INSERT INTO contacts(age) VALUES(25)"}' \
http://localhost:3000/query
Read the database
curl -H "Content-Type: application/json" \
--request POST \
--data '{"type":"read","query":"SELECT * FROM contacts"}' \
http://localhost:3000/query
Repository
pebble
Owner
Statistic
- 1
- 0
- 0
- 0
- 3
- over 3 years ago
- March 27, 2021
License
Links
Synced at
Thu, 21 Nov 2024 23:47:55 GMT
Languages