Skip to content

Ecotrust-Canada/json-crud

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ever been tempted to use JSON files as application data because it's simple? I was, and this small library is the result.

#Examples (in coffeescript)

db = (require 'json-crud') 'mydb'

db.put 'collection1', {'property': 'value'}

db.all 'collection1', (err, recs)->
  console.log recs

Of course, it's useful to do this over http.

app = (require 'express')()

db.restify app

Now we can do the above operations as:

curl --data "property=value" http://localhost/data/collection1

curl http://localhost/data/collection1

#Similar Stuff#

https://github.com/flosse/json-file-store

https://github.com/Softmotions/ejdb

About

Dead simple JSON store with REST crud.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 100.0%