MarkLogic Node.js Client API

The MarkLogic Node.js Client API is an open-source JavaScript library that allows developers to quickly, easily, and reliably access MarkLogic from their Node applications.

The Node.js API is developed in the open on GitHub. Submit issues and pull requests there to contribute.

Node.js Client API on GitHub ›

Installation

npm

The Node.js Client API is available from npm. From within your project directory run the following at the commandline:

npm install marklogic --save

Learn more about installing and using npm.

Additional releases and the latest development branch are available on GitHub.

Features

For developers using—or looking to use—Node.js in their application stack, the Node.js Client API is the fastest, easiest, and most reliable way to communicate with a MarkLogic database.

The API provides an asynchronous JavaScript interface for key MarkLogic capabilities, such as

  • search
  • document management
  • batch loading
  • transactions
  • aggregates

Combined with MarkLogic's ability to index and manage JSON documents natively, the Node.js Client API is an ideal tool for full-stack JavaScript development.

The Node.js Client API is written in JavaScript specifically for Node. It encapsulates best practices on both the Node and MarkLogic ends, for example, enforcing entirely asynchronous I/O and providing conveniences for building complex queries that leverage MarkLogic’s rich indexes.

Its interface is designed to be familiar and comfortable to Node developers. For performance-critical or resource-intensive operations, the Node.js Client API provides an extension mechanism that executes JavaScript on Server, where it runs close to the data.

Tutorials and Samples

Requirements

Required Software is listed in the Node.js Application Developer's Guide, including supported versions of Node.js.

See Also

MarkLogic also provides supported APIs for Java and generic REST/HTTP clients.

Documentation

Comments

  • "Node.js Client API Getting Started" is linked to the staging site. Cannot access the link.
    • Thanks, it should work now.
      • This is working fine for small documents like 500KB. Whenever I used Marklogic nodejs library to read document large document like 2 MB or 10 MB. I am getting single chunk as a success request and also I get null response. can you help me?