Skip to content

Configuration

ThieryMichel edited this page Jan 29, 2018 · 10 revisions

Instance configuration

On EzMaster, you can edit the instance configuration:

  • username: Required - username for admin access

  • password: Required - password for admin access

  • userAuth: { username, password }: Optional - add username and password to restrict user access, omit to deactivate.

  • naan: Optional - used to autogenerate URIs (see node-inist-ark)

  • subpublisher: Optional - used to autogenerate URIs (see node-inist-ark)

  • languages: Required - an array of languages defined by a label and a code which will be proposed when selecting a property language

  • collectionClass: Optional - the class rdf:type of each resource

  • datasetClass: Optional - the class rdf:type of the dataset

  • exporters: Required - an array of the allowed exporters

  • loader: Required - an array of loaders (which import your data) with their options

  • host: Optional - the public host which will be used to generate resources URIs. It will fallback on the EzMaster environment variable EZMASTER_PUBLIC_URL. Format is http://[host] (no ending slash)

  • mongo: Optional - Allow to override the default mongo configuration given by ezMaster. You can override all or part of the config, available properties are :

    • host: the host and port pointing to the mongo instance eg: localhost:27017
    • dbName: The name of the database eg: lodex
  • perPage: Optional - the number of item perPage when displaying the dataset. Default to 10

  • topFieldsCount: Optional - the number of fields displayed in the resource page, before displaying the tabs (DETAILS, SHARE/EXPORT, ONTOLOGY)

Technical documentation

Technical configuration is handled by node-config and is located inside ./config:

  • default.js: contains the default configuration which other files may override
  • development-dist.js: will be duplicated as development.js with make install and override the default config with values specific to the development environment.
  • production-dist.js: will be duplicated as production.js with make install and override the default config with values specific to the production environment.
  • test-dist.js: will be duplicated as test.js with make install and override the default config with values specific to the test environment.

The expected configuration contains:

  • port: Number - The application port
  • mongo: Object - How to connect to the mongo server
  • auth: Object - Configuration of the authentication mechanims
    • cookieSecret: String - secret used to encrypt the JWT token inside the authentication cookie
    • headerSecret: String - secret used to encrypt the JWT token inside the authentication header
    • expiresIn: Number - expiration delay of the JWT token in milliseconds
  • buildFrontend: Boolean - determines wether the API should build the frontend with webpack. Used to disable build on test environment.
Clone this wiki locally