{"id":46572,"date":"2018-07-17T00:00:00","date_gmt":"2018-07-17T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/getting-started-with-the-griddb-nodejs-client\/"},"modified":"2025-11-13T12:54:36","modified_gmt":"2025-11-13T20:54:36","slug":"getting-started-with-the-griddb-nodejs-client","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/","title":{"rendered":"Getting Started with the GridDB NodeJS Client"},"content":{"rendered":"<h2>Introduction {#intro} GridDB has released a database connector for the extremely popular<\/h2>\n<p><a href=\"https:\/\/nodejs.org\/en\/\">node.js<\/a> and just like the <a href=\"https:\/\/griddb.net\/en\/blog\/getting-started-with-griddbs-golang-client\/\">Golang connector<\/a>, it was built using the <a href=\"http:\/\/www.swig.org\/\">SWIG library<\/a>. The node.js client supports node.js version 6 running on CentOS 6&amp;7. Node.js&#8217;s initial release was in 2009 and after nearly a decade, it has allowed JavaScript to become <a href=\"https:\/\/insights.stackoverflow.com\/survey\/2018\/#most-popular-technologies\">the most widely used language<\/a> today. With node.js&#8217;s still surging relevance in the development world, this connector was a high priority for the GridDB team. This blog will go through installing, setting up and testing the database connector for GridDB. <\/p>\n<style>\n  ul {\n    padding-left: 36px;\n}\n.toc_container {\n    border: 1px solid #aaa !important;\n    display: table !important;\n    font-size: 95%;\n    margin-bottom: 1em;\n    padding: 20px;\n    width: auto;\n}\n.toc_title {\n    font-weight: 700;\n    text-align: center;\n}\n.toc_container li, .toc_container ul, .toc_container ul li, .toc_container ol li{\n    list-style: outside none none !important;\n}\n<\/style>\n<\/p>\n<div id=\"toc-block\" style=\"background: #f9f9f9 none repeat scroll 0 0;border: 1px solid #aaa; padding: 20px; width: auto; display: table;margin-bottom: 1em;\">\n<h5 id=\"toc\">\n    Table of Contents<br \/>\n  <\/h5>\n<div class=\"toc_container\">\n<ul id=\"toc-list\" style=\"list-style-type: none !important;\">\n<li>\n        1 \u00a0\u00a0\u00a0<a href=\"#setup-node\">Node.js Client Setup and Installation<\/a>\n      <\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>\n              1.1 <a href=\"#possible-build-issues\">Possible Build Issues<\/a>\n            <\/li>\n<\/ul><\/div>\n<\/li>\n<li>\n        2 \u00a0\u00a0\u00a0<a href=\"#connecting-to-griddb\">Connecting to GridDB with Node.js<\/a>\n      <\/li>\n<li>\n        3 \u00a0\u00a0\u00a0<a href=\"#schemas-containers\">Creating Row Schemas with JavaScript<\/a>\n      <\/li>\n<li>\n        4 \u00a0\u00a0\u00a0<a href=\"#queries\">TQL Queries and Data Management<\/a>\n      <\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n          <\/ul>\n<\/p><\/div>\n<\/li>\n<li>\n        5 \u00a0\u00a0\u00a0<a href=\"#timestamp-and-blob-data\">Handling Timestamp Data<\/a>\n      <\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n          <\/ul>\n<\/p><\/div>\n<\/li>\n<li>\n        6 \u00a0\u00a0\u00a0<a href=\"#reference\">References<\/a>\n      <\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>\n              6.1 <a href=\"#source-code\">Source Code<\/a>\n            <\/li>\n<\/ul><\/div>\n<\/li>\n<\/ul><\/div>\n<\/div>\n<h3>Node.js Client Setup and Installation {#setup-node} To build the node client on your system, you will first need to have the<\/h3>\n<p><a href=\"https:\/\/github.com\/griddb\/c_client\" title=\"C client Github Page\">GridDB C client<\/a> built and installed. You can follow this <a href=\"https:\/\/griddb.net\/en\/blog\/using-griddbs-cpythonruby-apis\/#c-intro\">blog post<\/a> on how to set up and test the C client if you are not familiar. There are also easy instructions found on the <a href=\"https:\/\/github.com\/griddb\/c_client\">GitHub page<\/a> itself. Once the C Client is confirmed to be working, we will need to clone the GitHub repository for the node.js client.<\/p>\n<pre class=\"prettyprint\">$ git clone https:\/\/github.com\/griddb\/nodejs_client\n<\/pre>\n<p>Now that you have obtained the source code from GitHub, you can simply follow the instructions in the<\/p>\n<p><code>README<\/code> on the Node.js Client&#8217;s <a href=\"https:\/\/github.com\/griddb\/nodejs_client\" title=\"Node.js client Github repository\">Github page<\/a>. The official README document from GitHub indicates that both SWIG and PCRE need to be built and confirmed working prior to building the node.js client.<\/p>\n<pre class=\"prettyprint\">$ wget https:\/\/sourceforge.net\/projects\/pcre\/files\/pcre\/8.39\/pcre-8.39.tar.gz\n$ tar xvfz pcre-8.39.tar.gz\n$ cd pcre-8.39\n$ .\/configure\n$ make\n$ make install\n$ wget https:\/\/prdownloads.sourceforge.net\/swig\/swig-3.0.12.tar.gz\n$ tar xvfz swig-3.0.12.tar.gz\n$ cd swig-3.0.12\n$ .\/configure\n$ make\n$ make install\n<\/pre>\n<h5>Possible Issues When Building the Node.js Client {#possible-build-issues} Occasionally, this error may occur when issuing<\/h5>\n<p><code>make<\/code> on the Node.js client package:<\/p>\n<pre class=\"prettyprint\">$ make\nerror while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory\n<\/pre>\n<p>This may be an issue with your paths. If you followed the node.js_client&#8217;s GitHub instructions, you should have installed pcre and swig before attempting to make. An issue can occur where your LIBRARY_PATH is not pointing to pcre, thus not allowing the SWIG library to work. You can easily test if this is the case:<\/p>\n<pre class=\"prettyprint\">$ swig -version\nswig: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory\n<\/pre>\n<p>If this error pops up, you simply run:<\/p>\n<pre class=\"prettyprint\">$ find \/ -name libpcre.so.1\n<\/pre>\n<p>and note the location of the file. Once found, you can run:<\/p>\n<pre class-\"prettyprint\"> $ export LD_LIBRARY_PATH=\/usr\/local\/lib:$LD_LIBRARY_PATH <\/pre>\n<p>Your command of<\/p>\n<p><code>swig -version<\/code> should now work. Try to make make again. If another issue pops up:<\/p>\n<pre class=\"prettyprint\">g++ -fPIC -std=c++0x -g -O2 -Iinclude -Isrc -Iusr\/include\/node -DNODE_GYP_MODULE_NAME=griddb -DV8_DEPRECATION_WARNINGS=1 -DBUILDING_NODE_EXTENSION -c -o src\/griddb_js.o src\/griddb_js.cxx\nsrc\/griddb_js.cxx:171:18: fatal error: node.h: No such file or directory\n #include &lt;node.h>\n                  ^\ncompilation terminated.\nmake: *** [src\/griddb_js.o] Error 1\n<\/pre>\n<p>You may need to install the node.js development tools and to need to edit your Makefile and change the location of the node.h file:<\/p>\n<pre class=\"prettyprint\">$ sudo yum install nodejs-devel\n$ cd ~\/nodejs_client\n$ vi Makefile\nINCLUDES_JS += -I\/usr\/include\/node\n<\/pre>\n<p>The node.js client should now compile properly. If issues arise, please post on our<\/p>\n<p><a href=\"\/en\/forums\/forum\/top\/\">forum<\/a> for support.<\/p>\n<h3>Connecting to GridDB with JavaScript {#connecting-to-griddb} And now that the prep-work is done, we can connect to GridDB with JavaScript. To do this, it is the same process as with other packages (&#8220;require&#8221;). Here&#8217;s an example of connecting a GridDB instance:<\/h3>\n<pre class=\"prettyprint\">var griddb = require('griddb_node');\nvar fs     = require('fs');\nvar factory = griddb.StoreFactory.getInstance();\nvar store = factory.getStore({\n                        \"host\": process.argv[2],\n                        \"port\": process.argv[3],\n                        \"cluster_name\": process.argv[4],\n                        \"username\": process.argv[5],\n                        \"password\": process.argv[6]});\n<\/pre>\n<p>The first two lines are standard node.js boilerplate. The variable<\/p>\n<p><code>store<\/code> uses node.js command line (CL) arguments. When running a generic node file, you run in your terminal:<\/p>\n<pre class=\"prettyprint\">$ node file1.js\n<\/pre>\n<p>So, to connect to your GridDB cluster and run the code at the same time, you need to implement the CL arguments.<\/p>\n<pre class=\"prettyprint\">$ node blog.js 239.0.0.1 31999 temperature admin admin\n<\/pre>\n<h3>Creating Schemas and Containers {#schemas-containers} Schemas for containers and rows are created by calling the<\/h3>\n<p><code>griddb.ContainerInfo<\/code> object in conjunction with the <code>store.putContainer<\/code> object; more information can be gathered in the <a href=\"http:\/\/www.griddb.org\/nodejs_client\/NodejsAPIReference.htm\">node.js API Reference<\/a>. For example, to create a new container, first the column types need to be set via creating a new instance of a <code>griddb.ContainerInfo<\/code> object:<\/p>\n<pre class=\"prettyprint\">var conInfo = new griddb.ContainerInfo(\"col01\",\n                   [\n                        [\"name\", griddb.GS_TYPE_STRING],\n                        [\"status\", griddb.GS_TYPE_BOOL],\n                        [\"count\", griddb.GS_TYPE_LONG],\n                        [\"lob\", griddb.GS_TYPE_BLOB]\n                   ], griddb.GS_CONTAINER_COLLECTION,\n                   true)\n<\/pre>\n<p>The first parameter, a<\/p>\n<p><code>string<\/code> is the container name. The rest are the column names along with that column&#8217;s type. Rows can be added onto columns by utilizing the <code>griddb.Container put<\/code> method. For example:<\/p>\n<pre class=\"prettyprint\">var col2;\nstore.putContainer(conInfo, false)\n    .then(col => {\n        col2 = col;\n        col.createIndex(\"count\", griddb.GS_INDEX_FLAG_DEFAULT);\n        return col;\n    })\n    .then(col => {\n        col.setAutoCommit(false);\n        col.put([\"name01\", false, 1, \"ABCDEFGHIJ\"]);\n        return col;\n    })\n\/\/ The rest of the object was cut off for brevity's sake\n<\/pre>\n<p>The first parameter for the<\/p>\n<p><code>putContainer<\/code> method takes container information (<code>conInfo<\/code>). It then deals with <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Promise\">JavaScript promises<\/a> to create indexes and populate columns and data. <code>col.put<\/code> is explicitly putting a row of data into the column called &#8220;name&#8221; which takes type <code>STRING<\/code>.<\/p>\n<h3>Querying and Retrieving Data {#queries} Once you have your containers populated with data and inserted into GridDB, you are ready to query and fetch your data. Similar to the Python or Java APIs, all you need to is to construct a<\/h3>\n<p><strong>Query object<\/strong> (or <code>griddb_go.Query<\/code> type) with the TQL query you would like to issue to your container. Once that is done, simply <strong>fetch<\/strong> the query&#8217;s results and store it in a <code>griddb_go.RowSet<\/code> object. Once the containers have been populated with relevant data, the next step will surely be querying. To query data using the node.js client API, we simply call <code>query<\/code> method from the <code>container<\/code> object. GridDB uses TQL, a SQL-like language, to conduct its queries. For example:<\/p>\n<pre class=\"prettyprint\">var col2;\nstore.putContainer(conInfo, false)\n        .then(col => {\n                col2 = col;\n                col.createIndex(\"count\", griddb.GS_INDEX_FLAG_DEFAULT);\n                return col;\n        })\n        .then(col => {\n                col.setAutoCommit(false);\n                col.put([\"name01\", false, 1, \"ABCDEFGHIJ\"]);\n                return col;\n        })\n        .then(col => {\n                col.commit(); \/\/commits calls are required to commit the current transaction and start a new transaction\n                return col;\n        })\n        .then(col => {\n                \/\/ container.query takes the raw TQL\n                query = col.query(\"select *\");\n                \/\/ the fetch method returns the results in the form of RowSet\n                return query.fetch();\n        })\n        .then(rs => {\n                \/\/ RowSet is the result from the query.fetch\n                while (rs.hasNext()) { \/\/ While the row has another row after the current\n                        console.log(rs.next());\/\/print that row\n                }\n                col2.commit();\n        })\n        .catch(err => {\n                console.log(err.what());\n                for (var i = 0; i &lt; err.getErrorStackSize(); i++) {\n                        console.log(\"[\", i, \"]\");\n                        console.log(err.getErrorCode(i));\n                        console.log(err.getMessage(i));\n                }\n        });\n<\/pre>\n<p>The above code snippet has comments explaining the pertinent portions. To query your GridDB containers\/columns, you need to use a combination of the<\/p>\n<p><code>query<\/code> and <code>fetch<\/code> methods, along with the <code>next()<\/code> method from the RowSet object. When the client returns results from a query, it will return a RowSet promise. With this promise, the typical workflow is to run a <code>while<\/code> loop, checking for <code>while<\/code> <code>RowSet.hasNext()<\/code> print <code>RowSet.next()<\/code>.<\/p>\n<h4>Aggregation TQL {#aggregation-tql} You can also use<\/h4>\n<p><em>TQL<\/em> to create and issue aggregation queries. The methods of performing and fetching <code>griddb_go.AggregationResult<\/code> from containers is fairly similar to the Python API. Once you have obtained the <strong>RowSet<\/strong> fetched from your query, instead of using <code>rowSet.NextRow()<\/code> we simply change it to <code>.NextAggregation()<\/code>. With that <code>AggregationResult<\/code> object, we use the <code>.Get()<\/code> to get the type of number we need. TQL also allows the ability to issue aggregation queries. To do this, you simply issue your raw TQL query with the proper aggregation operations. Here&#8217;s an example:<\/p>\n<pre class=\"prettyprint\">var timeseries;\nstore.getContainer(\"point01\")\n        .then(ts => {\n        timeseries = ts;\n        query = ts.query(\"select * from point01 where not active and voltage > 50\");\n        return query.fetch();\n    })\n        .then(rowset => {\n        var row;\n        while (rowset.hasNext()) {\n            row = rowset.next();\n            var timestamp = Date.parse(row[0]);\n            aggCommand = \"select AVG(voltage) from point01 where timestamp > TIMESTAMPADD(MINUTE, TO_TIMESTAMP_MS(\" + timestamp + \"), -10) AND timestamp &lt; TIMESTAMPADD(MINUTE, TO_TIMESTAMP_MS(\" + timestamp + \"), 10)\";\n            aggQuery = timeseries.query(aggCommand);\n            aggQuery.fetch()\n                .then(aggRs => {\n                    while (aggRs.hasNext()) {\n                        aggResult = aggRs.next();\n                        console.log(\"[Timestamp = \" + timestamp + \"] Average voltage = \"+ aggResult.get(griddb.GS_TYPE_DOUBLE));\n                    }\n                });\n       }\n    })\n<\/pre>\n<p>As shown in the example above, once the aggregation result is ready to be run after being queried, the API has a special<\/p>\n<p><code>AggregationResult.get(Type type)<\/code> method.<\/p>\n<h3>Handling Timestamp Data {#timestamp-data} Because GridDB is a database with some emphasis on TimeSeries data and with aspirations of IoT superiority, we need to touch on dealing with TimeSeries data. Luckily for us, native JavaScript is already quite adept at dealing with timestamp data. No special functions required.<\/h3>\n<h2>Conclusion {#conclusion} Now that the blog is complete, the hope is that reading this should lend you enough of a helping hand to go out there and begin developing using node.js and GridDB. Of course, if any questions arise, we wholly encourage use of the<\/h2>\n<p><a href=\"\/en\/forums\/forum\/top\/\">GridDB Forum<\/a>.<\/p>\n<h4>Reference<\/h4>\n<ul>\n<li>\n<p>Node.js <a href=\"https:\/\/nodejs.org\/en\/download\/package-manager\/\" title=\"Download Node.js via package manager\">version 6.14.3<\/a> was used for this post on a <strong>CentOS 6.9<\/strong> operating system.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/griddb\/griddb_nosql\/releases\/download\/v3.0.1\/griddb_nosql-3.0.1-1.linux.x86_64.rpm\" title=\"Download GridDB CE\">GridDB Community Edition 3.0.1<\/a> was used as the GridDB database for this tutorial<\/p>\n<\/li>\n<li>\n<p>The source code for the GridDB node.js client can be found on the <a href=\"https:\/\/github.com\/griddb\/nodejs_client\" title=\"Node.js client Github Page\">official Github repository<\/a>.<\/p>\n<\/li>\n<li>\n<p>This <a href=\"http:\/\/www.griddb.org\/nodejs_client\/NodejsAPIReference.htm\" title=\"Node.js API Reference\">reference page<\/a> lists all the objects and resources from GridDB that can be accessed with the node.js client<\/p>\n<\/li>\n<\/ul>\n<h4>Source Code {#source-code} All the source code used in this post was directly from the<\/h4>\n<p><a href=\"https:\/\/github.com\/griddb\/nodejs_client\/tree\/master\/sample\">GitHub page<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using the SWIG library. The node.js client supports node.js version 6 running on CentOS 6&amp;7. Node.js&#8217;s initial release was in 2009 and after nearly a decade, it has allowed JavaScript to become the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":25791,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46572","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting Started with the GridDB NodeJS Client | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started with the GridDB NodeJS Client | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-17T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:54:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2018\/07\/blog_title_28.png\" \/>\n\t<meta property=\"og:image:width\" content=\"870\" \/>\n\t<meta property=\"og:image:height\" content=\"490\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Israel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Israel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\"},\"author\":{\"name\":\"Israel\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740\"},\"headline\":\"Getting Started with the GridDB NodeJS Client\",\"datePublished\":\"2018-07-17T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:54:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\"},\"wordCount\":1121,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/07\/blog_title_28.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\",\"name\":\"Getting Started with the GridDB NodeJS Client | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/07\/blog_title_28.png\",\"datePublished\":\"2018-07-17T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:54:36+00:00\",\"description\":\"Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2018\/07\/blog_title_28.png\",\"contentUrl\":\"\/wp-content\/uploads\/2018\/07\/blog_title_28.png\",\"width\":870,\"height\":490},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740\",\"name\":\"Israel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g\",\"caption\":\"Israel\"},\"url\":\"https:\/\/www.griddb.net\/en\/author\/israel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting Started with the GridDB NodeJS Client | GridDB: Open Source Time Series Database for IoT","description":"Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using","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:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started with the GridDB NodeJS Client | GridDB: Open Source Time Series Database for IoT","og_description":"Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using","og_url":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2018-07-17T07:00:00+00:00","article_modified_time":"2025-11-13T20:54:36+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2018\/07\/blog_title_28.png","type":"image\/png"}],"author":"Israel","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Israel","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/"},"author":{"name":"Israel","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740"},"headline":"Getting Started with the GridDB NodeJS Client","datePublished":"2018-07-17T07:00:00+00:00","dateModified":"2025-11-13T20:54:36+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/"},"wordCount":1121,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/07\/blog_title_28.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/","url":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/","name":"Getting Started with the GridDB NodeJS Client | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/07\/blog_title_28.png","datePublished":"2018-07-17T07:00:00+00:00","dateModified":"2025-11-13T20:54:36+00:00","description":"Introduction {#intro} GridDB has released a database connector for the extremely popular node.js and just like the Golang connector, it was built using","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/getting-started-with-the-griddb-nodejs-client\/#primaryimage","url":"\/wp-content\/uploads\/2018\/07\/blog_title_28.png","contentUrl":"\/wp-content\/uploads\/2018\/07\/blog_title_28.png","width":870,"height":490},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740","name":"Israel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g","caption":"Israel"},"url":"https:\/\/www.griddb.net\/en\/author\/israel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46572"}],"version-history":[{"count":1,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46572\/revisions"}],"predecessor-version":[{"id":51262,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46572\/revisions\/51262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/25791"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}