All Histograph components use histograph-config to load their configuration parameters:
var config = require('histograph-config');histograph-config loads the default configuration from histograph.default.yml and merges this with a required user-specified configuration file. You can specify the location of your own configuration file in two ways:
- Start the Histograph module with the argument
--config path/to/config.yml - Set the
HISTOGRAPH_CONFIGenvironment variable to the path of the configuration file:
export HISTOGRAPH_CONFIG=/Users/bert/code/histograph/config/histograph.bert.ymlThis configuration file should at least specify the following options:
api:
dataDir: /Users/bert/data/histograph
admin:
name: histograph
password: password
neo4j:
user: neo4j
password: password
import:
dirs:
- ../data
- ../../erfgoed-en-locatie/historische-geocoder/dataIf you want to use this package in a project with a different schema, you can pass a config dir that contains the following files:
├── config.schema.json
├── default.yml
└── local.yml
All files must be provided and local.yml will override default.yml. The idea is that local.yml is specific to the production or development environment. You can specify the location of this directory in two ways:
- Start the project module with the argument
--config-dir path/to/config - Set the
HISTOGRAPH_CONFIG_DIRenvironment variable to the path of the configuration file:
export HISTOGRAPH_CONFIG_DIR=/Users/bert/code/transparantnederland/configCopyright (C) 2016 Waag Society.