Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

lokijs-plugin

2.0.0 • Public • Published

About lokijs-plugin

A hapi plugin to facilitate the initialization of lokijs within your application. Version 2.0.0 of this plugin has been updated and tested specifically for working with version 17 of Hapi.

Build Status bitHound Overall Score bitHound Dependencies bitHound Code

See the example directory for details on accessing the database within routes.

Usage

'use strict';
 
const Hapi = require('hapi');
 
const server = new Hapi.Server({
    host: 'localhost',
    port: 3000
});
 
const startup = async () => {
    await server.register([{
        plugin: require('lokijs-plugin'),
        options: {
            env: 'NODEJS' 
        }
    }]);
    await server.start();
};
 
startup().catch((err) => {
    throw err;
});
 
console.log(`${new Date()}: server running at ${server.info.uri}`);

install

npm i lokijs-plugin

Downloadsweekly downloads

12

version

2.0.0

license

BSD-3-Clause

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar