1.0.0 • Published 7 years ago

crappydb v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

crappydb

A database that only lets you put things into it and retrieve them. It doesn't even persist them. It just stores them in memory. Invest in a good uninterruptible power supply. Good luck!

Inserting

Request

Perform a PUT request with application/json MIME media type to the /:collectionName route where collectionName is the name of the collection you're inserting into.

The body of your request must be a JSON object with an id property. The id will be used as a key to retrieve it later.

If an item with the id already exists in the collection, it will be overwritten.

Response

The response body will be a message telling you whether the item was inserted with or without overwriting an existing item that already had its id.

Retrieving

Request

Perform a GET request to the /:collectionName/:id route where collectionName is the name of the collection you're inserting into and id is the id property of the item you're looking for.

Response

If the collection does not exist, the response body will be a message telling you so.

If the item is not found in the collection, the response body will be a message telling you so.

If the collection exists and the item was found in it, the response body will be the object, in JSON format.

1.0.0

7 years ago