 {
  console.log(err);
}
{% endhighlight %}
{% include code/end.html %}

{% include code/start.html id="get1" type="promise" %}
{% highlight js %}
db.get('mydoc').then(function (doc) {
  // handle doc
}).catch(function (err) {
  console.log(err);
});
{% endhighlight %}
{% include code/end.html %}

#### Example Response:
{% highlight js %}
{
  "_id": "mydoc",
  "_rev": "1-A6157A5EA545C99B00FF904EEF05FD9F"
  "title": "Rock and Roll Heart",
}
{% endhighlight %}

The response contains the document as it is stor