bipio-server/bipio — pull request #14 by offlinehacker (2014-08-10 23:11:33+00:00)
Title: Improve installation and configuration process

**Do not merge yet, still a few(mostly docs) changes to come.**

## Motivation:

In a process of packaging bipio for our distribution(nixos) i found it hard to
decouple code, configuration and data. These paths were hardcoded, but could be
easily made variable, giving system adiministrator control where to put
configuration and data. Also there was no way to install package non
interactivelly, because running npm install spawns interactive setup script.

## Changes:

- setup script: add optional environment variable to run it non-interactivelly
- setup script: add options to select data and cdn directory(full paths)
- package.json: do not run setup script on install, it's installation not
setup, packaing is not a phase where database is configured
- package.json: add several script for starting bipio and for tools(including
for setup)
- bootstrap.js: use NODE_CONFIG_DIR env variable if set, otherwise use
hardcoded config path
- bootstrap.js: use datadir and cdn from config file(they are now full paths)
- pod-install.js: make more portable, pods might be in other locations
specified by NODE_PATH, also use configuration path from GLOBAL.CFG, defined by
bootstrap
- README: update readme with new installation and configuration process,
changes especially if installing with npm

## Warning:

This process breaks configuration back compatibility, because datadir and cdn are now full paths!