How to use confidence - 10 common examples

To help you get started, we’ve selected a few confidence examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hks-epod / paydash / config / manifest.js View on Github external
{
            plugin: './app/routes/contact.js'
        },

        //  Editor routes
        {
            plugin: './app/routes/editor.js'
        },
        //  Api routes
        {
            plugin: './app/routes/api.js'
        }
    ]
};

internals.store = new Confidence.Store(internals.manifest);

exports.get = function(key) {
    return internals.store.get(key, internals.criteria);
};
exports.meta = function(key) {
    return internals.store.meta(key, internals.criteria);
};
github micromata / http-fake-backend / manifest.js View on Github external
};

// Add plugins to manifest.registration for every endpoint in ./server/api
Fs.readdirSync(pathToEndpointConfigFiles).map((file) => {

    return Path.join(pathToEndpointConfigFiles, file);
}).filter((file) => {

    return Fs.statSync(file).isFile();
}).forEach((file) => {

    const plugin = { plugin: './server/api/' + Path.parse(file).name };
    manifest.registrations.push(plugin);
});

const store = new Confidence.Store(manifest);


exports.get = function (key) {

    return store.get(key, criteria);
};


exports.meta = function (key) {

    return store.meta(key, criteria);
};
github ravisuhag / jolly / config / manifest.js View on Github external
plugin: './app/routes/core.js'
        },

        //  Pages routes
        {
            plugin: './app/routes/pages.js'
        },

        //  Auth routes
        {
            plugin: './app/routes/auth.js'
        }
    ]
};

internals.store = new Confidence.Store(internals.manifest);

exports.get = function(key) {
    return internals.store.get(key, internals.criteria);
};
exports.meta = function(key) {
    return internals.store.meta(key, internals.criteria);
};
github hapipal / boilerplate / server / manifest.js View on Github external
'use strict';

const Dotenv = require('dotenv');
const Confidence = require('confidence');
const Toys = require('toys');

// Pull .env into process.env
Dotenv.config({ path: `${__dirname}/.env` });

// Glue manifest as a confidence store
module.exports = new Confidence.Store({
    server: {
        host: '0.0.0.0',
        port: process.env.PORT || 3000,
        debug: {
            $filter: 'NODE_ENV',
            development: {
                log: ['error', 'implementation', 'internal'],
                request: ['error', 'implementation', 'internal']
            }
        }
    },
    register: {
        plugins: [
            {
                plugin: '../lib', // Main plugin
                options: {}
github mtharrison / hapi.js-in-action / CH07 - Creating Modular Applications with Plugins / 7.4 / 7.4.3 / index.js View on Github external
'use strict';

const Confidence = require('confidence');
const Glue = require('glue');

const manifest = new Confidence.Store(require('./config')).get('/', {
    env: process.env.NODE_ENV
});

const options = { relativeTo: __dirname };

Glue.compose(manifest, options, (err, server) => {

    if (err) {
        throw err;
    }
    server.start((err) => {

        if (err) {
            throw err;
        }
        console.log('Server started at: ' + server.info.uri);
github zehnergroup / cheesy-poofs / src / server / manifest.js View on Github external
}
      }]
    },
    './src/server/hello': {},
    './src/server/assets': {},
    './src/server/api/test': {},
    './src/server/marty': {
      routes: path.join(__dirname, '../client/app/routes'),
      serverSideBaseUrl: AppConfig.get('/api/serverSideBasePath'),
      app: path.join(__dirname, '../client/app/app')
    }
  }
};


var store = new Confidence.Store(manifest);


exports.get = (key) => {

  return store.get(key, criteria);
};


exports.meta = (key) => {

  return store.meta(key, criteria);
};
github Esri / storymap-crowdsource / config / require / index.js View on Github external
exports.get = internals.Require = function (key, criteria) {

  this.store = new Confidence.Store({
    baseUrl: {
      $filter: 'mode',
      dist: 'src/',
      default: ''
    },
    paths: {
      'app': 'javascript',
      'jquery': 'lib/jquery/dist/jquery.min'
    }
  });

  return this.store.get(key, criteria);
};
github jsperf / jsperf.com / manifest.js View on Github external
{ plugin: './server/web/health' },
    { plugin: './server/web/home' },
    { plugin: './server/web/popular' },
    { plugin: './server/web/public' },
    { plugin: './server/web/redirects' },
    { plugin: './server/web/search' },
    { plugin: './server/web/sitemap/xml' },
    { plugin: './server/web/sponsor' },
    { plugin: './server/web/test' },
    { plugin: './server/web/testimonials' },
    { plugin: './server/web/edit' },
    { plugin: './server/web/delete' }
  ]
};

var store = new Confidence.Store(manifest);

exports.get = function (key) {
  return store.get(key, criteria);
};

exports.meta = function (key) {
  return store.meta(key, criteria);
};
github jedireza / generator-hapi-style / web / templates / _config.js View on Github external
const config = {
    $meta: 'This file configures the plot device.',
    projectName: '<%= appName %>',
    port: {
        web: {
            $filter: 'env',
            test: 9090,
            $default: 8080
        }
    }
};


const store = new Confidence.Store(config);


exports.get = function (key) {

    return store.get(key, criteria);
};


exports.meta = function (key) {

    return store.meta(key, criteria);
};
github khandelwal-arpit / hapijs-starterkit / config / config.js View on Github external
{
                    module: 'good-http',
                    args: ['http://localhost:8000/logs', 
                        {
                            wreck: {
                                headers: { 'x-api-key': 12345 }
                            }
                        }
                    ]
                }
            ]
        }
    }
};

internals.store = new Confidence.Store(internals.config);

exports.get = function(key) {
    return internals.store.get(key, internals.criteria);
};

exports.meta = function(key) {
    return internals.store.meta(key, internals.criteria);
};

confidence

Configuration API

BSD-3-Clause
Latest version published 4 years ago

Package Health Score

59 / 100
Full package analysis

Popular confidence functions