Skip to content

Instantly share code, notes, and snippets.

@bithavoc
Created February 9, 2014 15:50
Show Gist options
  • Save bithavoc/8900958 to your computer and use it in GitHub Desktop.
Save bithavoc/8900958 to your computer and use it in GitHub Desktop.
couche.d proposal
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