Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Something to read JSON files to be used a properties within a nodejs application

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib override with username based props September 23, 2010
Octocat-spinner-32 README.md override with username based props September 23, 2010
Octocat-spinner-32 package.json rearrange to package September 23, 2010
README.md

Node Properties

Node properties allows you to externalise configuration in a consistent manner using JSON files in a known location.

Usage

From the root of your application (where the executing directory will be) create a folder called properties and a file within this called 'build.json'. Then in your application require this module and access your properties directly. An example is reading the port to start your application on:

  var props = require('properties');
  console.log(props.port); 

You can override properties by supplying a JSON file with the same name as the user who is executing the process, e.g. properties/robbieclutton.json. Any properties included here will overwrite those in the build.json file enabling local customisations.

Something went wrong with that request. Please try again.