Available Settings
---

# Runtime

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| port                       | Port for the server to use                                                                                                                                     | runtime.port                        | --port                             | `3000`                                                                                                        | `Integer`                   | No       |
| serve                      | What folder the server should expose                                                                                                                           | runtime.serve                       | --serve                            | `["build/client"]`                                                                                            | `Filepath / [ Filepath ]`   | No       |
| favicon                    | Path to the favicon file, specially handled on the server                                                                                                      | runtime.favicon                     | --favicon                          | `null`                                                                                                        | `String`                    | No       |
| startBundle                | Relative path to a bundle to start when calling &quot;start&quot;, is not needed in most cases                                                                 | runtime.startBundle                 | --startBundle                      | `null`                                                                                                        | `Filepath`                  | No       |
| stats                      | Path to client stats file from build                                                                                                                           | runtime.stats                       | --stats                            | `"build/client/webpack-stats.json"`                                                                           | `Filepath`                  | No       |
| applicationName            | Application name to use for &lt;title&gt;                                                                                                                      | runtime.applicationName             | --applicationName                  | `null`                                                                                                        | `String`                    | Yes      |
| meta                       | Meta tags to be used in &lt;head&gt;, should be formatted as objects. See https://github.com/nfl/react-helmet                                                  | runtime.meta                        | --meta                             | `[{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"}]` | `[ { String } ]`            | No       |
| link                       | Link tags to be used in &lt;head&gt;, should be formatted as objects. See https://github.com/nfl/react-helmet                                                  | runtime.link                        | --link                             | `[{"rel":"icon","href":"favicon.png"}]`                                                                       | `[ { String } ]`            | No       |
| script                     | Script tags to be used in &lt;head&gt;, should be formatted as objects. See https://github.com/nfl/react-helmet                                                | runtime.script                      | --script                           | `null`                                                                                                        | `[ { String } ]`            | No       |
| ssr                        | If server side rendering should be enabled                                                                                                                     | runtime.ssr                         | --ssr                              | `true`                                                                                                        | `Boolean`                   | No       |
| clientBlocking             | If &quot;prefetch&quot; should block a route transition on the client                                                                                          | runtime.clientBlocking              | --clientBlocking                   | `false`                                                                                                       | `Boolean`                   | No       |
| configWhitelistProperty    | A single property to expose to the client from node-config. Make sure that this property does NOT contain any secrets that should not be exposed to the world. | runtime.configWhitelistProperty     | --configWhitelistProperty          | `"DANGEROUSLY_EXPOSE_TO_CLIENT"`                                                                              | `String`                    | No       |

## Debug

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| server                     | Filter for debug messages that should be shown for the server, see https://npmjs.com/package/debug                                                             | runtime.debug.server                | --debug-server                     | `"roc:*"`                                                                                                     | `String`                    | No       |
| client                     | Filter for debug messages that should be shown for the client, see https://npmjs.com/package/debug                                                             | runtime.debug.client                | --debug-client                     | `"roc:*"`                                                                                                     | `String`                    | No       |

## Koa
Settings for how Koa should handle paths

### Lowercase

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| enabled                    | If paths should be transformed to lowercase                                                                                                                    | runtime.koa.lowercase.enabled       | --koa-lowercase-enabled            | `true`                                                                                                        | `Boolean`                   | No       |
| defer                      | If this should be performed after looking for a file on disk                                                                                                   | runtime.koa.lowercase.defer         | --koa-lowercase-defer              | `true`                                                                                                        | `Boolean`                   | No       |

### Normalize

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| enabled                    | If paths should be normalized, that is remove extra slashes                                                                                                    | runtime.koa.normalize.enabled       | --koa-normalize-enabled            | `true`                                                                                                        | `Boolean`                   | No       |
| defer                      | If this should be performed after looking for a file on disk                                                                                                   | runtime.koa.normalize.defer         | --koa-normalize-defer              | `false`                                                                                                       | `Boolean`                   | No       |

### TrailingSlashes

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| enabled                    | Set to true to enforce trailing slashes, false to remove them and null for no rule                                                                             | runtime.koa.trailingSlashes.enabled | --koa-trailingSlashes-enabled      | `true`                                                                                                        | `Boolean`                   | No       |
| defer                      | If this should be performed after looking for a file on disk                                                                                                   | runtime.koa.trailingSlashes.defer   | --koa-trailingSlashes-defer        | `true`                                                                                                        | `Boolean`                   | No       |

## Base

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| href                       |                                                                                                                                                                | runtime.base.href                   | --base-href                        | `"ROC_PATH"`                                                                                                  | `Unknown`                   | No       |

## Template

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| path                       | A directory where the template for the application can be found. Will default to internal path                                                                 | runtime.template.path               | --template-path                    | `null`                                                                                                        | `Filepath`                  | No       |
| name                       | Name of the template file that will be used. Uses Nunjucks, please see documentaion for more info                                                              | runtime.template.name               | --template-name                    | `"main.html"`                                                                                                 | `String`                    | No       |

# Dev

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| debug                      | Filter for debug messages that should be shown for the server, see https://npmjs.com/package/debug                                                             | dev.debug                           | --dev-debug                        | `"roc:*"`                                                                                                     | `String`                    | No       |
| port                       | Port for the dev server, will need to be a free range of at least 3                                                                                            | dev.port                            | --dev-port                         | `3001`                                                                                                        | `Integer`                   | No       |
| watch                      | Files/folders that should trigger a restart of the server                                                                                                      | dev.watch                           | --dev-watch                        | `["config/","roc.config.js"]`                                                                                 | `Filepath / [ Filepath ]`   | No       |
| reloadOnServerChange       | If Browsersync should reload the browser when the server is rebuilt                                                                                            | dev.reloadOnServerChange            | --dev-reloadOnServerChange         | `false`                                                                                                       | `Boolean`                   | No       |
| open                       | If Browsersync should open the server when it has started                                                                                                      | dev.open                            | --dev-open                         | `false`                                                                                                       | `Boolean`                   | No       |
| a11y                       | If A11Y validation should be active. Currently it´s suggested to not enable reduxDevtools with this                                                            | dev.a11y                            | --dev-a11y                         | `false`                                                                                                       | `Boolean`                   | No       |

## DevMiddleware

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| noInfo                     | If no info should be sent to the console                                                                                                                       | dev.devMiddleware.noInfo            | --dev-devMiddleware-noInfo         | `true`                                                                                                        | `Boolean`                   | No       |
| quiet                      | If nothing should be sent to the console                                                                                                                       | dev.devMiddleware.quiet             | --dev-devMiddleware-quiet          | `false`                                                                                                       | `Boolean`                   | No       |

## HotMiddleware

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| reload                     | If the browser should be reloaded if it fails to hot update the code                                                                                           | dev.hotMiddleware.reload            | --dev-hotMiddleware-reload         | `false`                                                                                                       | `Boolean`                   | No       |
| noInfo                     | If no info should be sent to the console                                                                                                                       | dev.hotMiddleware.noInfo            | --dev-hotMiddleware-noInfo         | `false`                                                                                                       | `Boolean`                   | No       |
| quiet                      | If nothing should be sent to the console                                                                                                                       | dev.hotMiddleware.quiet             | --dev-hotMiddleware-quiet          | `false`                                                                                                       | `Boolean`                   | No       |

## ReduxDevtools

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| enabled                    | If Redux Devtools should be enabled                                                                                                                            | dev.reduxDevtools.enabled           | --dev-reduxDevtools-enabled        | `true`                                                                                                        | `Boolean`                   | No       |
| position                   | Starting position of the Devtools, can be left, right, top or bottom                                                                                           | dev.reduxDevtools.position          | --dev-reduxDevtools-position       | `"right"`                                                                                                     | `/^left|right|top|bottom$/` | No       |
| size                       | Default size of the Devtools, should be a number between 0 and 1                                                                                               | dev.reduxDevtools.size              | --dev-reduxDevtools-size           | `0.3`                                                                                                         | `Unknown`                   | No       |
| visibilityKey              | The key that should toogle the Redux Devtools, will be combine with CTRL                                                                                       | dev.reduxDevtools.visibilityKey     | --dev-reduxDevtools-visibilityKey  | `"H"`                                                                                                         | `String`                    | No       |
| positionKey                | The key that should change position of the Redux Devtools, will be combine with CTRL                                                                           | dev.reduxDevtools.positionKey       | --dev-reduxDevtools-positionKey    | `"Q"`                                                                                                         | `String`                    | No       |
| defaultVisible             | If the Redux Devtools should be shown by default                                                                                                               | dev.reduxDevtools.defaultVisible    | --dev-reduxDevtools-defaultVisible | `false`                                                                                                       | `Boolean`                   | No       |
| theme                      | The theme to use for the Redux Devtools, see https://github.com/gaearon/redux-devtools-themes                                                                  | dev.reduxDevtools.theme             | --dev-reduxDevtools-theme          | `"ocean"`                                                                                                     | `String`                    | No       |

## ReduxLogger

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| level                      | The logging level for Redux Logger, can be either warn, error or info                                                                                          | dev.reduxLogger.level               | --dev-reduxLogger-level            | `"info"`                                                                                                      | `/^warn|error|info$/`       | No       |
| collapsed                  | If the logged actions by Redux Logger should be collapsed by default                                                                                           | dev.reduxLogger.collapsed           | --dev-reduxLogger-collapsed        | `true`                                                                                                        | `Boolean`                   | No       |
| duration                   | If Redux Logger should print the duration of each action                                                                                                       | dev.reduxLogger.duration            | --dev-reduxLogger-duration         | `true`                                                                                                        | `Boolean`                   | No       |
| timestamp                  | If Redux Logger should print the timestamp with each action                                                                                                    | dev.reduxLogger.timestamp           | --dev-reduxLogger-timestamp        | `true`                                                                                                        | `Boolean`                   | No       |

## Yellowbox

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| enabled                    | If YellowBox should be enabled                                                                                                                                 | dev.yellowbox.enabled               | --dev-yellowbox-enabled            | `true`                                                                                                        | `Boolean`                   | No       |
| ignore                     | Array of prefix strings that should be ignored by YelloBox                                                                                                     | dev.yellowbox.ignore                | --dev-yellowbox-ignore             | `["[HMR]","Warning: React attempted to reuse markup in a container"]`                                         | `[ String ]`                | No       |

# Build

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| path                       | The basepath for the application                                                                                                                               | build.path                          | --build-path                       | `"/"`                                                                                                         | `Filepath`                  | No       |
| assets                     | An array of files to include into the build process                                                                                                            | build.assets                        | --build-assets                     | `["roc-web-react/styles/base.scss"]`                                                                          | `[ Filepath ]`              | No       |
| mode                       | What mode the application should be built for. Possible values are &quot;dev&quot;, &quot;dist&quot; and &quot;test&quot;                                      | build.mode                          | --build-mode                       | `"dist"`                                                                                                      | `/^dev|dist|test$/i`        | No       |
| target                     | For what target the application should be built for. Possible values are &quot;client&quot; &amp; &quot;server&quot;                                           | build.target                        | --build-target                     | `["client","server"]`                                                                                         | `[ /^client|server$/i ]`    | No       |
| disableProgressbar         | Should the progress bar be disabled for builds                                                                                                                 | build.disableProgressbar            | --build-disableProgressbar         | `false`                                                                                                       | `Boolean`                   | No       |
| outputName                 | The name of the generated application bundle, will be appended &quot;roc.js&quot;                                                                              | build.outputName                    | --build-outputName                 | `"app"`                                                                                                       | `String`                    | No       |
| moduleBuild                | NOT IMPLEMENTED YET                                                                                                                                            | build.moduleBuild                   | --build-moduleBuild                | `false`                                                                                                       | `Unknown`                   | No       |
| moduleStyle                | NOT IMPLEMENTED YET                                                                                                                                            | build.moduleStyle                   | --build-moduleStyle                | `null`                                                                                                        | `Unknown`                   | No       |
| koaMiddlewares             | The koa middlewares to add to the server instance, will be added after the default  middlewares                                                                | build.koaMiddlewares                | --build-koaMiddlewares             | `"koa-middlewares.js"`                                                                                        | `Filepath`                  | No       |
| useDefaultKoaMiddlewares   | If Roc should use internally defined koa middlewares, please look at the  documentation for what middlewares that are included                                 | build.useDefaultKoaMiddlewares      | --build-useDefaultKoaMiddlewares   | `true`                                                                                                        | `Boolean`                   | No       |
| reducers                   | The reducers to use if no entry file is given, will use default entry files internally                                                                         | build.reducers                      | --build-reducers                   | `"reducers.js"`                                                                                               | `Filepath`                  | No       |
| useDefaultReducers         | If Roc should use internally defined reducers, please look at the documentation  for what reducers that are included                                           | build.useDefaultReducers            | --build-useDefaultReducers         | `true`                                                                                                        | `Boolean`                   | No       |
| routes                     | The routes to use if no entry file is given, will use default entry files internally                                                                           | build.routes                        | --build-routes                     | `"routes.js"`                                                                                                 | `Filepath`                  | No       |
| useDefaultRoutes           | If Roc should use an internal wrapper around the routes, please look at the documentation for more details                                                     | build.useDefaultRoutes              | --build-useDefaultRoutes           | `true`                                                                                                        | `Boolean`                   | No       |
| reduxMiddlewares           | The middlewares to use if no entry file is given, will use default entry files internally                                                                      | build.reduxMiddlewares              | --build-reduxMiddlewares           | `"redux-middlewares.js"`                                                                                      | `Filepath`                  | No       |
| useDefaultReduxMiddlewares | If Roc should use internally defined middlewares, please look at the  documentation for what middlewares that are included                                     | build.useDefaultReduxMiddlewares    | --build-useDefaultReduxMiddlewares | `true`                                                                                                        | `Boolean`                   | No       |
| clientLoading              | The React component to use on the first client load while fetching data, will only be used if clientBlocking is set to true                                    | build.clientLoading                 | --build-clientLoading              | `null`                                                                                                        | `Filepath`                  | No       |

## Entry

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| client                     | The client entry point file                                                                                                                                    | build.entry.client                  | --build-entry-client               | `null`                                                                                                        | `Filepath`                  | No       |
| server                     | The server entry point file                                                                                                                                    | build.entry.server                  | --build-entry-server               | `null`                                                                                                        | `Filepath`                  | No       |

## OutputPath

| Name                       | Description                                                                                                                                                    | Path                                | CLI Flag                           | Default                                                                                                       | Type                        | Required |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
| client                     | The output directory for the client build                                                                                                                      | build.outputPath.client             | --build-outputPath-client          | `"build/client"`                                                                                              | `Filepath`                  | No       |
| server                     | The output directory for the server build                                                                                                                      | build.outputPath.server             | --build-outputPath-server          | `"build/server"`                                                                                              | `Filepath`                  | No       |
