A CLI tool to perform data manipulations to a JSON data store.
- Node:
brew install node
or Node docs
- Clone repo:
git clone git@github.com:agdavid/key-value-timestamp-datastore.git
npm install
$ node index.js --help
$ node index.js add --key=<someStringKey> --value=<someStringValue>
$ node index.js find --key=<someStringKey>
$ node index.js find --value=<someStringValue>
$ node index.js find --timestamp=<someNumberTimestamp>
$ node index.js remove --key=<someStringKey> --timestamp=<someNumberTimestamp>
$ node index.js list
Get basic usage info for all provided CLI scripts.
node index.js --help
or
node index.js -h
Add object to the JSON data store.
node index.js add --key=<key> --value=<value>
<key>
| Required<value>
| Required
Find objects in the JSON data store that match the provided optional parameters.
node index.js find --key=<key> --value=<value> --timestamp=<timestamp>
<key>
| Optional | Key of the JSON objects to locate.<value>
| Optional | Value of the JSON objects to locate.<timestamp>
| Optional | UNIX timestamp of JSON objects to locate.
- If no
<key|value|timestamp>
are provided, command will return all objects in JSON data store.
Remove object matching the required key and timestamp parameters
node index.js remove --key=<key> --timestamp=<timestamp>
<key>
| Required<timestamp>
| Required
- Run
node index.js <command_name> [options]
to test various commands/options. - Write code!
- Please use git-flow and commit your changes on a feature branch, rebase it on develop branch before finishing the feature, then issue pull request to develop branch