{"id":351,"date":"2015-10-21T17:34:07","date_gmt":"2015-10-21T17:34:07","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/"},"modified":"2015-10-21T17:34:07","modified_gmt":"2015-10-21T17:34:07","slug":"exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/ko\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/","title":{"rendered":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Part 1: Register a User<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Necessary Materials<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Node.js<\/li>\n\n\n<li>Express.js<\/li>\n\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Node Modules used<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Couchbase Node.js SDK\/N1QL<\/li>\n\n\n<li>body-parser<\/li>\n\n\n<li>uuid<\/li>\n\n\n<li>node-forge<\/li>\n\n<\/ul>\n\n\n\n<p>The most important part of building a social network begins with the users. If you just have a directory of people, you are looking at the most basic form of a social network, where people can learn about each other. In this way, the most critical thing a user needs to be able to do is create an account. After this point, the rest of our challenges become manipulating this user document, or at least some aspects of it. Before I go further into depth about this, let me explain the basic file structure that exists in this application, which will be critical in understanding how Touchbase operates.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">File Structure<\/h4>\n\n\n\n<p><!-- HTML generated using hilite.me --><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> app.js \/\/contains our basic setup for the app\r\n package.json \/\/contains necessary node modules for app\r\n bower.json \/\/ contains necessary bower components for app\r\n config.json \/\/ contains necessary configuration info for app\r\n \/routes \/\/contains the API endpoints for node (where back-end data is received)\r\n  --routes.js \r\n \/models \/\/contains all functions to complete back-end operations, divided by type\r\n  --picturemodel.js \r\n  --sessionmodel.js\r\n  --statisticsmodel.js\r\n  --usermodel.js\r\n  --publishmodel.js\r\n  --emailmodel.js\r\n \/icons \/\/contains all our icons\r\n \/bower_components \/\/where all bower components get saved using bower install\r\n \/node_modules \/\/where all node modules get stored using npm install\r\n \/public \/\/where all front-end materials are stored\r\n  --js\r\n  --html\r\n  --index.html\r\n  --nav.html\r\n<\/code><\/pre>\n\n\n\n<p>I will assume a general proficiency with this file structure, but if you are very new to it, please refer to Nic Raboy&#8217;s tutorial on creating a game API with Node.js and Couchbase <a href=\"https:\/\/www.couchbase.com\/blog\/ko\/making-a-game-api-server-using-nodejs-revisited\/\">here.<\/a><\/p>\n\n\n\n<p>In our <strong>app.js<\/strong> file, we will have done much of the necessary setup. For this post, I will ask you to first refer to <strong>routes\/routes.js<\/strong>. Here one will find the <strong>&#8216;\/api\/registerUser&#8217;<\/strong> endpoint. For anyone very new to Node.js or API-based applications, an endpoint is simply where a REST API call will transmit its data to the back-end. For example, if I made some sort of http POST request on the front-end to an endpoint called <strong>&#8216;\/api\/registerUser&#8217;<\/strong>, I could send some user data to this endpoint, and it will perform the necessary operations on the back-end (creating a user document) before transmitting back some message (typically, a JSON object).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">&#8216;\/api\/registerUser&#8217; API<\/h4>\n\n\n\n<p>In this case, the <strong>\/api\/registerUser&#8217;<\/strong> endpoint will receive a JSON object which will contain the contents of a form that the user had filled to register for our site, Touchbase. On the back-end Touchbase performs some basic validation to make sure that necessary user information has been input for this account to make sure it can be used as a legitimate account. We first check that the object has name, email, and password attribute. These are all checked on the front-end as well, and display error messages, however, it is never enough to trust the front-end validation. Front-end javascript can be easily manipulated by an end-user, and could expose security holes in the application. Keeping this in mind, the same validation done on the front-end is performed again on the back-end. Certain fields are validated with regular expressions. For example, to make sure that the password is strong enough. Then the password is checked against the confirmation password to make sure they are identical. The email is also checked to make sure that it has not already been put in use before using <strong>User.advancedSearch<\/strong> (this function will be explained at length soon). If all these conditions are met, the <strong>User.create<\/strong> function is executed.<\/p>\n\n\n\n<p>To see the <strong>&#8216;User.create&#8217;<\/strong> function, go to <strong>models\/usermodel.js<\/strong>, or look at te snippet below. In this file you will see a function called <strong>&#8216;User.create&#8217;<\/strong>. This function is used to generate a JSON document that outlines different aspects of the user. As you may notice, some of these aspects come directly from the user input, which was passed to the <strong>&#8216;User.create&#8217;<\/strong> function as <strong>&#8216;params&#8217;<\/strong>, while others are generated upon the document&#8217;s creation without any input from the user. For example, a random UUID (universally unique identifier) is created as the user&#8217;s document ID; learn more about UUIDs <a href=\"https:\/\/searchsoa.techtarget.com\/definition\/UUID\">here<\/a>. For this, I used the <a href=\"https:\/\/github.com\/defunctzombie\/node-uuid\">uuid node module<\/a>. This document ID (UUID) should be a unique way to identify the user for all future purposes. Because we want to make sure that each document is completely unique, we use a UUID, and because we want to ensure that the document can be as flexible as possible, we avoid using any particular use attribute as the document ID. In the future, we will primarily search these users by attribute, and we will rarely ever be directly using these UUIDs, unless it is in a case that we know we are searching for one specific user.<\/p>\n\n\n\n<p>We also want to maintain the time the user document was generated, and look at the logins over time, so we use the current time, which we generate using JavaScript, and then insert these into our &#8216;timeTracker&#8217; nested object. You may notice that these variables are also split up oddly by stringAttributes, dropdownAttributes and arrayAttributes. The reason for this, is mainly because of how we will query these attributes using Couchbase&#8217;s N1QL query language. This is explained in depth in <a href=\"https:\/\/www.couchbase.com\/blog\/ko\/touchbase-part-0-creating-a-data-model\/\">part 0<\/a> of the blog series, but in essence, the reason it is structured this way is to allow for the code to be changed very little to repurpose it. Within login, you will also see the attribute &#8216; password&#8217; which is a hashed version of the password that the user entered. This is done using <a href=\"https:\/\/github.com\/digitalbazaar\/forge\">node-forge<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">&#8216;User.create&#8217; function<\/h4>\n\n\n\n<p>We now use a N1QL insert statement to create the document. Upon error, you will see that a callback function is called. You will notice, that there is a callback passed in as a parameter, which is the <strong>&#8216;function(error, result)&#8217;<\/strong> which you see in the <strong>routes\/routes.js<\/strong> file. This is used to avoid having to repeatedly write the same syntax to handle success and errors. If the insert is successful (the result that should occur), then the result will be passed back to the <strong>routes\/routes.js<\/strong> function for <strong>&#8216;\/api\/registerUser&#8217;<\/strong>, and it will continue to be used for further action. After this we see that this is passed to <strong>&#8216;Session.makeVerification&#8217;<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">N1QL &#8216;User Insert&#8217; Query<\/h4>\n\n\n\n<p><!-- HTML generated using hilite.me --><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO  users (KEY, VALUE) VALUES ($1, $2);\r\n<\/code><\/pre>\n\n\n\n<p>The information we generated in our last result was created in the form of a JSON object that contained our userID, and the user document, which were generated with the <strong>&#8216;User.create&#8217;<\/strong> function. To see an example of the document that would be entered, look at <a href=\"https:\/\/www.couchbase.com\/blog\/ko\/touchbase-part-0-creating-a-data-model\/\">part 0<\/a>. This information is used for <strong>&#8216;Session.makeVerification&#8217;<\/strong> to generate an email which is used to verify the user&#8217;s email address. If not, they won&#8217;t be able to access their account.<\/p>\n\n\n\n<p>If you care to take this extra step of verification in your accounts, that will be discussed in the next post, part 2,about email verification with Couchbase, Nodemailer and the Sengrid API.<\/p>\n\n\n\n<p>Thank you all for your time, and I hope this was useful. Please drop a comment below with any questions, feedback, or criticism.<\/p>","protected":false},"excerpt":{"rendered":"<p>Part 1: Register a User Necessary Materials Node Modules used The most important part of building a social network begins with the users. If you just have a directory of people, you are looking at the most basic form of a social network, where people can learn about each other. In this way, the most [&hellip;]<\/p>\n","protected":false},"author":60,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[137],"class_list":["post-351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Understanding how Touchbase operates - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/ko\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document\" \/>\n<meta property=\"og:description\" content=\"Part 1: Register a User Necessary Materials Node Modules used The most important part of building a social network begins with the users. If you just have a directory of people, you are looking at the most basic form of a social network, where people can learn about each other. In this way, the most [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/ko\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-21T17:34:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pranav Mayuram\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pranav Mayuram\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/\"},\"author\":{\"name\":\"Pranav Mayuram\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/454261061bad5159ad2696e0bf162eaa\"},\"headline\":\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document\",\"datePublished\":\"2015-10-21T17:34:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/\"},\"wordCount\":1111,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/\",\"name\":\"Understanding how Touchbase operates - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-10-21T17:34:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/454261061bad5159ad2696e0bf162eaa\",\"name\":\"Pranav Mayuram\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g61baa4ff0f18aa9a8ce672f0f97f1ac0\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g\",\"caption\":\"Pranav Mayuram\"},\"description\":\"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/author\\\/pranav-mayuram\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Understanding how Touchbase operates - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/ko\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/","og_locale":"ko_KR","og_type":"article","og_title":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document","og_description":"Part 1: Register a User Necessary Materials Node Modules used The most important part of building a social network begins with the users. If you just have a directory of people, you are looking at the most basic form of a social network, where people can learn about each other. In this way, the most [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/ko\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-10-21T17:34:07+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Pranav Mayuram","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pranav Mayuram","Est. reading time":"6\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/"},"author":{"name":"Pranav Mayuram","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/454261061bad5159ad2696e0bf162eaa"},"headline":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document","datePublished":"2015-10-21T17:34:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/"},"wordCount":1111,"commentCount":1,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","articleSection":["Uncategorized"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/","url":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/","name":"Understanding how Touchbase operates - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","datePublished":"2015-10-21T17:34:07+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 1: Creating a User Document"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/454261061bad5159ad2696e0bf162eaa","name":"Pranav Mayuram","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g61baa4ff0f18aa9a8ce672f0f97f1ac0","url":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","caption":"Pranav Mayuram"},"description":"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js.","url":"https:\/\/www.couchbase.com\/blog\/ko\/author\/pranav-mayuram\/"}]}},"acf":[],"authors":[{"term_id":137,"user_id":60,"is_guest":0,"slug":"pranav-mayuram","display_name":"Pranav Mayuram","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/comments?post=351"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/351\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media?parent=351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/categories?post=351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/tags?post=351"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/ppma_author?post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}