Configuration

The Pagedip CLI tool has a dynamic configuration system to ensure it operates in different environments. You can place JSON or INI files to be parsed in one of the following locations:

  • .pagediprc in the current working directory.

  • Linux, Mac - /etc/pagedip/config or $HOME/.pagediprc

  • Windows - %USERPROFILE%/.pagediprc

Environment variables are also parsed for configuration. Variables should be prefixed with pagedip_, and deep properties should be separated with __.

# equivalent of { liveUrl: "http://mypagedip.com }
export pagedip_liveUrl=http://mypagedip.com

# equivalent of { api: { couchdb: "http://localhost:5984" } }
export pagedip_api__couchdb=http://localhost:5984

The last place configuration is derived from is the command line. Deep properties are separated with dots.

pagedip --port 8080 --api.couchdb http://localhost:5984 --config myconfig.json
Note: The above does not apply to a Windows IIS installation. Use the provided config.json file to configure Pagedip instead.

Pagedip has several categories of configuration:

  • General - Top-level configuration affecting all the various parts of Pagedip.

  • HTTP API - Specific configuration for the API server, such as CouchDB connection details.

  • Live - Configuration for the Pagedip live server, which handles Pagedip web distribution.