From the course: Introduction to Couchbase
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Solution: Complete a key value operation using Node.js - Couchbase Tutorial
From the course: Introduction to Couchbase
Solution: Complete a key value operation using Node.js
(upbeat music) - [Instructor] So, how did this challenge go? You have some options to choose from so I will show the code for two different key value operations. Please remember that I'm using the no-js code. If you're using a different language, please refer to the Couchbase documentation for those code examples. I'll start by pasting in the get code. When looking at this code, please note that any of the key value operations will start by obtaining the bucket, scope, and collection, as you can see here. The catch block is written to catch any errors thrown during the get operation in the try block. Now I'll save this and I'll run the application. And as you can see, I've received my expected results. And for those of you who chose the delete operation or for those super students who did both operations, I'll paste in the delete code. Again, you'll notice that we've still named our bucket, scope, and collection. We've entered the appropriate try catch block and we've changed the user…