slamdata/slamengine — pull request #152 by mossprescott (2014-08-05 00:14:33+00:00)
Title: Handle POST to /data/fs/[path]

Each line of the body is submitted to MongoDB as a "save" (which is effectively update/insert).

Given the MongoDB model, this actually supports creating a new collection, saving new documents to an existing collection, and updating existing documents (see the README).

All lines are parsed before any data is saved, so nothing is changed if the input is bad. However, partial writes can occur if the MongoDB driver gives an error.

Also added a command `save [path] [object]` to the REPL, and made the `ls` and `cd` commands actually work, for the most part.