Created
February 9, 2014 15:50
-
-
Save bithavoc/8900958 to your computer and use it in GitHub Desktop.
couche.d proposal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import heaploop.looping; | |
import couched; | |
import std.json; | |
void main() { | |
loop ^^ { | |
auto client = new CouchedClient("http://127.0.0.1:5984"); | |
client.databases.ensure("albums"); | |
CouchedDatabase db = client.databases["albums"]; | |
JSONValue album = parseJSON(q{ | |
name: "HurryUp, We're Dreaming", | |
artist_name: "M83" | |
}); | |
db.create(client.generateId, album); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment