Solutions

MarkLogic Data Hub Service

Fast data integration + improved data governance and security, with no infrastructure to buy or manage.

Learn More

Learn

Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Community

Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Company

Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

MarkLogic Node.js Client API

MarkLogic is a document database built from the ground up for managing heterogenous data. It stores and indexes JSON (and XML) natively and combines a complete JavaScript stored procedure environment and HTTP server, making it ideal for modern, full-stack JavaScript applications.

MarkLogic is used today in production on hundreds of mission-critical applications across different industries and the public sector. It provides the flexibility and scalability of NoSQL, without having to compromise on reliability and consistency that organizations have come to depend on with relational databases. Unlike most other NoSQL databases, MarkLogic offers ACID transactions—multi-document, multi-statement, and even XA—along with a rich set of built-in indexes, granular role-based security, and a shared-nothing architecture for scalability and high availability.

The MarkLogic Node.js Client API is the easiest way to integrate MarkLogic into a Node.js application. Installed from npm, it gives developers a fully asynchronous JavaScript API for document management, query, aggregates, and extensibility with JavaScript that runs in the database, close to the data.

Node.js Client API on GitHub ›

var marklogic = require('marklogic');
var conn = require('./env.js').connection; // Host and auth details
var db = marklogic.createDatabaseClient(conn);
var q = marklogic.queryBuilder;
db.documents.query(
  q.where(
    q.collection('countries'),
    q.value('region', 'Africa'),
    q.or(
      q.word('background', 'France'),
      q.word('Legal system', 'French')
    )
  )
).result(function(documents) {
    documents.forEach(function(document) {
      console.log(JSON.stringify(document));
    });
  });

Focus on application features rather than plumbing with out-of-the-box features

Move faster to production with proven reliability at scale

Maximize performance and flexibility—bringing code to the data

Enable modern end-to-end JavaScript development

Always open source on GitHub

Quick Start

Next Steps

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • It was an excellent article to hear from you which is very useful. Thank you so much for gathering all this information about MarkLogic Node.js <a href=https://mindmajix.com/node-js-training>Node.js</a> Client API with examples, it’s very clever and will be extremely helpful for all people.