canhazdb-driver-ejdb
v1.1.5
Published
A ejdb driver for canhazdb.
Downloads
7
Readme
canhazdb-driver-ejdb
An ejdb3 driver for canhazdb.
Server Via the CLI
npm install --global canhazdb-driver-ejdb
canhazdb-server \
--driver canhazdb-driver-ejdb \
--host localhost \
--port 7061 \
--query-port 8061 \
--data-dir ./canhazdb/one \
--tls-ca ./certs/ca.cert.pem \
--tls-cert ./certs/localhost.cert.pem \
--tls-key ./certs/localhost.privkey.pem
Server Via NodeJS
npm install --save canhazdb-driver-ejdb
const fs = require('fs');
const canhazdb = require('canhazdb-server');
async function main () {
const tls = {
key: fs.readFileSync('./certs/localhost.privkey.pem'),
cert: fs.readFileSync('./certs/localhost.cert.pem'),
ca: [ fs.readFileSync('./certs/ca.cert.pem') ],
requestCert: true /* this denys any cert not signed with our ca above */
};
const node1 = await canhazdb({
driver: require('canhazdb-driver-ejdb'),
host: 'localhost',
port: 7061, queryPort: 8061,
dataDirectory: './canhazdata/one',
tls, single: true
});
License
This project is licensed under the terms of the AGPL-3.0 license.