Skip to content

histograph/config

Repository files navigation

histograph-config

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:

  1. Start the Histograph module with the argument --config path/to/config.yml
  2. Set the HISTOGRAPH_CONFIG environment variable to the path of the configuration file:
export HISTOGRAPH_CONFIG=/Users/bert/code/histograph/config/histograph.bert.yml

This 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/data

If 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:

  1. Start the project module with the argument --config-dir path/to/config
  2. Set the HISTOGRAPH_CONFIG_DIR environment variable to the path of the configuration file:
export HISTOGRAPH_CONFIG_DIR=/Users/bert/code/transparantnederland/config

Copyright (C) 2016 Waag Society.