Skip to content
Charence edited this page Jul 30, 2018 · 18 revisions

Configuration descriptions

For an example please see the config/config_sample.js file in the repository.

  • development : Whether this is a local development environment. Flag to provide live reload for watching with gulp
  • host : base hostname for subdirectory/subdomain configuration
  • disableCache : disable the stash functionality of the API sever apiServer: settings for the server to run with
  • name: set a directory or subdomain
  • subdomain_or_subdir *: use name as a subdomain or subdirectory (0 or 1)
  • hostname: hostname on which api server is running (overriding)
  • http_port: port to run the API http service on
  • https_port: port to run the API https service on
  • HTTPSredirect: whether HTTP requests should be redirected to HTTPS
  • external_port: set to the external port that the API broadcasts on (set to http_port or https_port)
  • protocol: (Optional) Override the protocol of the URL for inlined requests to the API server. If left out defaults to the protocol of the requesting service.

google_api_key: key for accessing various Google APIs (optional)

cookie

  • secret : Secret passphrase for cookies, can be anthing.
  • parser_secret : Another secret passphrase, can be anything.
  • maxAge : Max age of the cookie in milliseconds default_format: If no extension is specified to the REST API then we assume this format as default.

servers: array of configurations for different front end services that use the rest api. These are under different subdomains or different hostnames.

  • hostname: hostname under which the service runs
  • http_port: http port on which the service would run
  • https_port: https port on which the service would run
  • template: JADE template file to use for the service

js_debug_level: determine to use the full js, or the minified version (debug = full, otherwise minified)

logfile: settings for logging

  • silent: whether to log out to the console. true is silent, false is enabled.
  • filename: output name of the log file
  • console_level: logging level (error, warn, info, debug, trace) to output to the console
  • file_level: logging level (error, warn, info, debug, trace) to output to the log file

db: settings to connect to the mongo database

  • host: host on which the mongodb runs
  • port: port on which to connect to the mongodb
  • username: username to use for mongodb authentication
  • password: password to use for mongodb authentication

ssl: (Optional) settings for ssl encryption, leave this out to disable it.

  • key: filename of ssl encryption key
  • cert: filename of ssl encryption certificate
  • ca: filename of certificate authority certificate (optional)

customLogins: (Optional) Any custom login pages

  • loginMessage : Message to display on the login page
  • topLogo : url to the top logo
  • backgroundImage : URL to the background

invoice_dir: (Optional) directory for saving temporary pdf and html files for invoices

uploadSizeLimit: (Optional) single upload file size limit

gaTrackId: (Optional) google analytic tracking id

contact:

  • email: email address for receiving message from contact us box
  • sales: (Optional) email address for receiving invoice copies

bcf_dir: directory for storing temporary bcf files