envok

1.0.5 • Public • Published

envok

Use Joi to validate/assert your required environment

Usage:


var envok = require('envok');
var Joi = require('joi');

//Will make sure NODE_ENV is present...and any other Joi validation you use..
//Also will return an object with camelized keys for each key in the schema
const config = envok({
  NODE_ENV: Joi.string().required().allow('development', 'staging', 'production'),
})

module.exports = config;

/envok/

    Package Sidebar

    Install

    npm i envok

    Weekly Downloads

    5,693

    Version

    1.0.5

    License

    none

    Unpacked Size

    3.05 kB

    Total Files

    4

    Last publish

    Collaborators

    • mandarind