Skip to content
Calvin edited this page Oct 23, 2017 · 3 revisions

Adventure requires a config file to be passed to it; so it can operate on the following variables:

  • name: The name of your instance.
  • headerFragment: The path of a file to transclude into the <head> block of the header, so you can insert things like SEO data.
  • runBehindProxy: This makes express trust the proxy and only listens on loopback, so a caching proxy can be put ahead of it safely. By default, false.
  • morganLogFormat: The format morgan will use when logging requests. By default, "dev."
  • mysql: The object to be passed to mysql2 when connecting to the server. Has items like database, server, port, user, password.
  • specialCaseLibraryOS: if the library page for OS should be special-cased with a special view.
  • perPage: When paginating, how many items should be shown per page. By default, 25.
  • perPageBounds: When paginating, how many items more or less the pagination control displays before it begins to truncate in either direction. By default, 5.
  • cseId: When using Google CSE, your ID.
  • publicBaseUrl: Used for making absolute URLs; mainly for RSS.
  • screenshotBaseUrl: The path prepended to screenshot filenames for display in the carousel.

For these items, see templates.

  • pageDirectory: By default, "pages."
  • viewDirectory: By default, "views."
  • resDirectory: Optional. If not used, then the route on /res will not be wired up; you can choose to instead handle the route with a web server in front of the application server. By default, "res."
Clone this wiki locally