Closed haydenyoung closed 5 years ago
To test:
create a keyvalue store:
curl http://localhost:3000/db/keyvalue --data 'create=true' --data 'type=keyvalue'
write a key/object-value to the store:
curl -X POST http://localhost:3000/db/keyvalue/put -H "Content-Type: application/json" -d '{"key":"mykey","value":"{ name: \"World\" }"}'
It should correctly parse the JSON and store a JS object against the key.
A simple:
console.log(db._index)
should show the full list correctly written to the keyvalue store.
To test:
create a keyvalue store:
curl http://localhost:3000/db/keyvalue --data 'create=true' --data 'type=keyvalue'
write a key/object-value to the store:
curl -X POST http://localhost:3000/db/keyvalue/put -H "Content-Type: application/json" -d '{"key":"mykey","value":"{ name: \"World\" }"}'
It should correctly parse the JSON and store a JS object against the key.
A simple:
console.log(db._index)
should show the full list correctly written to the keyvalue store.