Hacker News new | past | comments | ask | show | jobs | submit login

This is pretty cool -- it's like a mini-ElasticSearch (and of course I'm overstating):

    $ npm install -g phant
    $ phant
    $ telnet localhost 8081

    phant> create
    Enter a title> library
    Enter a description> a bunch of books
    Enter fields (comma separated)> title,author
    Enter tags (comma separated)> paper,cloth

    Stream created!
    PUBLIC KEY: yrDmwO3XZEF6vMajz9oVTwPYVNM
    PRIVATE KEY:  NYzxmKOdl8tEQ0Bn2d3WhXLbn2O
    DELETE KEY:  WxpPb29VEkuyAemL8za2INraDPb

    $ curl "http://localhost:8080/input/yrDmwO3XZEF6vMajz9oVTwPYVNM.json" -H 'Content-Type: application/json' -d '{"title": "The Book of Virtues", "author": "William J. Bennett"}' -H 'Phant-Private-Key: NYzxmKOdl8tEQ0Bn2d3WhXLbn2O'

    $ curl "http://localhost:8080/output/yrDmwO3XZEF6vMajz9oVTwPYVNM.json"
    [{"author":"William J. Bennett","timestamp":"2014-07-10T18:07:13.964Z","title":"The Book of Virtues"}]



You should edit out those public and private keys.


Why? I belieb that those keys are unique to the stream (which I don't really care about).


Sorry didn't see it was just a local instance you were running so it probably doesn't matter. In general I wouldn't let your public and private keys get out because anyone could start writing, deleting, etc. with those keys.


Thanks for looking out for me, though! One can never be too careful.


Obviously.



Not obvious to everyone. HN is a place for people to learn, as well as discuss.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: