Install MariaDB Connector/Node.js
This page is part of MariaDB's Documentation.
The parent of this page is: MariaDB Connector/Node.js
Topics on this page:
Overview
MariaDB Connector/Node.js is usually installed either from the Node.js repository or manually from the source code package.
Install MariaDB Connector/Node.js via Repository
To install MariaDB Connector/Node.js from the Node.js repository, use NPM:
$ npm install mariadb
NPM connects to the Node.js repository and downloads MariaDB Connector/Node.js and all relevant dependencies into the node_modules/
directory.
Install MariaDB Connector/Node.js via Source Code
To download and install the MariaDB Connector/Node.js manually from source code:
Go to the MariaDB Connector/Node.js download page
Ensure the "Product" dropdown reads "Node.js connector."
In the "Version" dropdown, select the version you want to download.
In the "OS" dropdown, select either "Platform independent (tar)" or "Platform independent (zip)", depending on whether you need a zip or tar archive.
Click the "Download" button to download the source code package.
When the source code package finishes downloading, install it with NPM:
$ npm install mariadb-connector-nodejs-*.tar.gz
NPM untars the download and installs MariaDB Connector/Node.js in the node_modules/
directory.