Skip to content

MacKinley/load-appconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

load-appconfig

A too simple config loader.

Usage

appconfg.js:

var root = __dirname + '/';

module.exports = {
  appRoot       : root,
  publicDir     : 'public/',
  frontendMain  : 'index.html',
  dbConfigName  : 'dbConfig.js',
  listeningPort : process.env.PORT || '8000'
};

app.js:

var config = require('load-appconfig');

var appRoot = config.appRoot;
var dbConfig = require(appRoot + config.dbConfigName);

No paths needed to load config.

Prerequisites

  • Node.js
  • File named appConfig.js in the root of your node app

Installation

$ npm install load-appconfig

About

A too simple config loader.

Resources

Stars

Watchers

Forks

Packages

No packages published