2.0.2 • Published 4 years ago

lokijs-plugin v2.0.2

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
4 years ago

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 and 18 of Hapi.

Build Status

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

Usage

'use strict';

const Hapi = require('@hapi/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}`);
2.0.2

4 years ago

2.0.1

5 years ago

2.0.0

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago