xulingfeng-01 / beanify-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beanify-env

JavaScript Style Guide

install

npm i beanify-env

options

usage

const Beanify=require("beanify")
const beanifyPlugin=require("beanify-plugin")

const b=new Beanify({})

b
    .register(require("beanify-env"),{
        schema: {
            type: 'object',
            required: ['PORT'],
            properties: {
                PORT: {
                    type: 'integer',
                    default: 6666
                }
            }
        }
    })
    .ready((err)=>{
        console.log(b.config.PORT==6666)
        b.close()
    })

About

License:MIT License


Languages

Language:JavaScript 100.0%