1.0.1 • Published 3 years ago

canhazdb-driver-sqlite v1.0.1

Weekly downloads
6
License
AGPL-3.0
Repository
github
Last release
3 years ago

canhazdb-driver-sqlite

GitHub code size in bytes GitHub package.json version GitHub js-semistandard-style

A sqlite3 driver for canhazdb.

Server Via the CLI

npm install --global canhazdb-driver-sqlite
canhazdb-server \
  --driver canhazdb-driver-sqlite \
  --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-sqlite
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-sqlite'),
    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.