
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
The MarkLogic Client API for Node.js provides access to the MarkLogic database from Node.js applications.
Release 1.0.2 of the MarkLogic Node.js API
First, install the MarkLogic into your local modules using npm.
npm install marklogic --save
The following example creates two documents in a collection using the built-in REST server for the Documents database:
var marklogic = require('marklogic');
var db = marklogic.createDatabaseClient({
host: 'localhost',
port: '8000',
user: 'admin',
password: 'admin',
authType: 'DIGEST'
});
db.createCollection(
'/books',
{author: 'Beryl Markham', ...},
{author: 'WG Sebald', ...}
)
.result(function(response) {
console.log(JSON.stringify(response,null,2));
}, function (error) {
console.log(JSON.stringify(error,null,2));
});
Other calls can create additional documents for the same collection.
Here are some resources that walk you through working with MarkLogic using the Node.js API:
The instructions describe:
The Node.js API also distributes with some additional examples to supplement the examples from the Getting Started introduction.
Follow the instructions in the example distribution:
examples/1readme.txt
After installing the dependencies including gulp, you can also build the reference documentation locally from the root directory of the marklogic package:
gulp doc
The documentation should be produced in the doc subdirectory.
To set up the test database and REST server, execute the following command in the root directory for the marklogic package:
node etc/test-setup.js
To tear down the test database and REST server, execute
node etc/test-teardown.js
The MarkLogic Node.js Client API is maintained by MarkLogic Engineering. It is designed for use in production applications with MarkLogic Server. Everyone is encouraged to file bug reports, feature requests, and pull requests through GitHub. This input is critical and will be carefully considered, but we can’t promise a specific resolution or timeframe for any request. In addition, MarkLogic provides technical support for release tags of the Node Client API to licensed customers under the terms outlined in the Support Handbook. For more information or to sign up for support, visit help.marklogic.com.
FAQs
The official MarkLogic Node.js client API.
The npm package marklogic receives a total of 512 weekly downloads. As such, marklogic popularity was classified as not popular.
We found that marklogic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.