Custom application configuration in source code

reference australia Updated Sep 10, 2026 8 min read app-config-source-code.md
Raw file servicenow.com

Configure a custom application [sys_app] in the now.config.json file for an application in source code.

Note: For the latest ServiceNow SDK application configuration documentation, see the now.config.json reference on GitHub.

You can configure the application settings and aspects specific to developing the application in source code, such as the directory structure. In the now.config.json file, add the following parameters to configure the application settings.

Parameter

Type

Description

appOutputDir

String

Directory to output the build artifacts to for packaging. The pack and install commands refer to this directory to package the artifacts. Default: dist/app

clientDir

String

Directory containing the client-side files for developing user interfaces with React.Default: src/client

dependencies

Object

The items in another application scope on which your application depends. You must specify the application scope and the dependency type and names or sys_ids.```json "dependencies": { "": { "": ["<sys_id or name>"], ... }, ... }

Text
For more information, see [Download ServiceNow Fluent application dependencies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/downloading-dependencies-now-sdk.md).
</td></tr><tr><td>
excludeFilePatterns
</td><td>
Array
</td><td>
A list of file patterns to exclude when transforming metadata XML to ServiceNow Fluent code or downloading dependencies. Files that match are discarded and not written to the metadata directory.
</td></tr><tr><td>
fluentDir
</td><td>
String
</td><td>
Directory containing ServiceNow Fluent files \(`.now.ts`\) that define application metadata in source code.Default: `src/fluent`
</td></tr><tr><td>
generatedDir
</td><td>
String
</td><td>
Directory containing generated ServiceNow Fluent files, including existing application metadata converted into ServiceNow Fluent code. This directory is relative to the directory defined with the **fluentDir** parameter.Default: `generated`
</td></tr><tr><td>
ignoreTransformTableList
</td><td>
Array
</td><td>
A list of tables to ignore when transforming application metadata into source code.
</td></tr><tr><td>
linter
</td><td>
Object
</td><td>
A configuration for ServiceNow Fluent and JavaScript module linting behavior.The module.enabled property controls whether to run linting on modules for compatibility with the JavaScript engine on the platform. If false, linting is turned off for local modules \(in `src/server`\) and third-party npm packages \(in `node_modules`\).
Default:
```json"linter": {  "module": {    "enabled": true  }}

metadataDir

String

Directory containing the application's metadata as XML files.Default: metadata

modulePaths

Object

A map of the module source files to their equivalent output files for if you use a custom transpilation step before building the application. For more information, see Using TypeScript in JavaScript modules with the ServiceNow SDK.Warning: You can't use this parameter and the tsconfigPath parameter. Configuring both results in an error.

packOutputDir

String

Directory to output the installable package (.zip file) when building the application. The install command refers to this directory to install the package.Default: target

serverModulesDir

String

Directory containing the JavaScript or TypeScript files to be built into JavaScript modules for use in server-side scripts.Default: src/server

serverModulesExcludePatterns

Array

A list of file patterns to exclude when building JavaScript modules.Default:

JSON
[  "**/*.test.ts",  "**/*.test.js",  "**/*.d.ts"]

serverModulesIncludePatterns

Array

A list of file patterns to include when building JavaScript modules.Default:

JSON
[  "**/*.ts",  "**/*.tsx",    "**/*.js",  "**/*.jsx",  "**/*.cts",  "**/*.cjs",  "**/*.mts",  "**/*.mjs",  "**/*.json"]

staticContentDir

String

Directory to output the static asset files used for developing user interfaces.Default: dist/static

staticContentPaths

Object

A map of the client-side source files to the output paths for static asset files.

defaultLanguage

String

The BCP 47 code of a default language for field labels [sys_documentation] in a table or column. The default language is used to resolve field labels with multiple languages.Default: en

tableOutputFormat

String

The type of build artifacts for table metadata XML generated from ServiceNow Fluent code.Valid values:

  • bootstrap: The build process outputs a bootstrap XML file with the <database> root element for the table, field label XML files [sys_documentation], licensing configuration XML files [ua_table_licensing_config], and auto-numbering XML files [sys_number].
  • component: The build process outputs XML files for each component of the Table API.

Default: bootstrap

taxonomy

Object

A configuration for organizing generated ServiceNow Fluent files, which maps table names to directories and defines a fallback directory. The default taxonomy configuration uses ServiceNow standard table classifications to add generated ServiceNow Fluent files in a logical directory structure within the fluent/generated directory when metadata is initially transformed into ServiceNow Fluent code. For example:- Business rules [sys_script] are added to the fluent/generated/server-development/business-rule directory.

  • Script includes [sys_script_include] are added to the fluent/generated/server-development/script-include directory.

You can override the default mappings or configure additional ones. In the following example, the configuration overrides the default directory for business rules [sys_script] and the fallback folder and configures an additional mapping for metadata from a custom table.

JSON
"taxonomy": {        "mapping": {            "sys_script": "scripts/server/rules",            "custom_table": "my-custom-folder/my-nested-folder"        },        "fallbackFolderName": "unclassified"}
  • mapping: An object that maps table names to directories. Directory paths are relative to the directory configured with the generatedDir parameter and must include only lowercase letters, numbers, hyphens, underscores, and slashes to separate subdirectories.
  • fallbackFolderName: A name for a directory to use for tables that don't have a default or a custom mapping configured. Within this directory, ServiceNow Fluent files are added to subdirectories named after the table, such as src/fluent/generated/other/x-unmapped-table/.

Default: Default taxonomy mappings are defined for all standard ServiceNow tables and are automatically applied when no custom configuration is defined in the now.config.json for an application. The default value of fallbackFolderName is other.

trustedModules

Array

A list of npm packages to identify as trusted (or internal). Trusted modules have access to ServiceNow APIs. For example:```json "trustedModules": [ "", // Specific package "@servicenow/*" // All packages from an organization ]

Text
In the EcmaScript Module \[sys\_module\] table, the **External source** field is set to false for trusted modules.
**Warning:** Only add dependencies that you trust completely as trusted modules.
Valid patterns:
-   Fully qualified package names, such as `'@servicenow/sdk'`.-   Organization prefixes with a wildcard, such as `'@servicenow/*'` or `'@mycompany/*'`.
</td></tr><tr><td>
tsconfigPath
</td><td>
String
</td><td>
A path to a `tsconfig.json` file with custom options for transpiling TypeScript into JavaScript during the build process. Specifying a `tsconfigPath` generates diagnostic results from TypeScript using the `tsconfig.json` file.**Warning:** You can't use this parameter and the `modulePaths` parameter. Configuring both results in an error.
Default: `.`
</td></tr><tr><td>
applicationRuntimePolicy
</td><td>
String
</td><td>
The runtime policy. For more information about runtime policies, see [Runtime access tracking](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/c_RuntimeAccessTracking.md).Valid values:
-   none: The system does not track runtime access requests. Application scripts can access resources from other applications as long as the table-level access settings allow it. Any configured network policies \(`networkPolicies`, `wildcardPolicy`, and `performancePolicy`\) are created but not enforced.-   tracking: The system runs the tracked operation as long as the table-level access settings allow it. Cross-scope privileges and any configured network policies \(`networkPolicies`, `wildcardPolicy`, and `performancePolicy`\) are created and enforced.-   enforcing: The system blocks the tracked operation from running until an administrator manually changes the status to **Allowed** and the table-level access settings allow it. Cross-scope privileges and any configured network policies \(`networkPolicies`, `wildcardPolicy`, and `performancePolicy`\) are created and enforced.
Default: none
</td></tr><tr><td>
networkPolicies
</td><td>
Array
</td><td>
A list of network access policy \[sys\_arp\_network\_policy\] definitions.-   policyType: Required. The type of network policy. If the policy type is now\_inbound\_global, the `scheme` property is required.
Valid values: csp\_script\_src, csp\_connect\_src, now\_inbound\_scoped, now\_inbound\_global, now\_outbound.
-   status: Required. The enforcement status of the policy.
Valid values: requested, allowed, denied
-   $id: A unique ID for the metadata object in the format `Now.ID['String' or Number]`.-   active: Flag that indicates whether the policy is active.-   host: Host address including the scheme, hostname, and optional port but not including the path.-   scheme: The protocol scheme. Required if the policy type is now\_inbound\_global and must be empty for all other types.
Valid values: http, https, ws, wss
-   path: A list of paths. Each path must start with a slash `(/)`. Use the `/*` suffix to allow for sub-paths \(`/api/*`\). If the policy type is now\_inbound\_scoped, provide either a path or resource.-   resource: A resource identifier for cross-scope access if the policy type is now\_inbound\_scoped. For example, `processor.subprocessor.context`. Provide either a path or resource.-   shortDescription: A short description of what the policy does.
```json"networkPolicies": [  {       "policyType": "String",      "status": "String",      "$id": "String" or Number,      "active": Boolean,      "host": "String",      "scheme": "String",      "path": [Array],      "resource": "String",      "shortDescription": "String"  }]

wildcardPolicy

Object

A wildcard, or exemption, policy [sys_arp_segment_policy] definition.- $id: A unique ID for the metadata object in the format Now.ID['String' or Number].

  • active: Flag that indicates whether the policy is active.

Default: false

  • network: The network pillar configuration that includes the network wildcard selections.

Valid values for networkWildcard: now_outbound, now_inbound_global, now_inbound_scoped, csp_connect_src, csp_script_src

  • scripting: The scripting pillar configuration that includes the scripting wildcard selections.

Valid values for scriptingWildcard: sys_script_include, scriptable

  • arl: The application resource limit (ARL) pillar configuration that includes the network wildcard selections.

Valid values for arlWildcard: scheduled_job_limit, event_handler, api_transaction_limit, interactive_transaction_limit

  • record: Flag that indicates whether to allow record pillar access.
  • shortDescription: A short description of what the policy does.
JSON
"wildcardPolicy": {  "$id": "String" or Number,  "active": Boolean,  "network": {      "active": Boolean,      "networkWildcard": [Array]  },  "scripting": {      "active": Boolean,      "scriptingWildcard": [Array]  },  "arl": {      "active": Boolean,      "arlWildcard": [Array]  },  "record": Boolean,  "shortDescription": "String"}

performancePolicy

Object

A performance quota template [sys_app_resource_limit_template] definition.- name: Required. A name for the performance quota template.

  • $id: A unique ID for the metadata object in the format Now.ID['String' or Number].
  • apiTransactionLimit: The API transaction quota percentage.
  • eventHandlerLimit: The event handler quota percentage.
  • interactiveTransactionLimit: The interactive transaction quota percentage.
  • mode: The enforcement mode for quota thresholds. If this parameter is not set, the value is determined by the value of the applicationRuntimePolicy parameter.

Valid values: disabled, enforced, logOnly

  • scheduledJobLimit: The scheduled job quota percentage.
JSON
"performancePolicy": {  "name": "String",  "$id": "String" or Number,  "apiTransactionLimit": Number,  "eventHandlerLimit": Number,  "interactiveTransactionLimit": Number,  "mode": "String",  "scheduledJobLimit": Number}
## Application configuration in source code
JSON
{  "scope": "x_snc_example_app",  "scopeId": "2f8400eb07426110f736e28f69d3017a",  "name": "ExampleApp",  "dependencies": \{    "global": \{      "tables": \["incident"\],      "roles": \["admin"\],    \},    "x\_custom": \{      "tables": \["custom\_table"\]    \}  \},  "metadataDir": "metadata",  "fluentDir": "src/fluent",  "generatedDir": "generated",  "serverModulesDir": "src/server",  "clientDir": "src/client",  "appOutputDir": "dist/app",  "staticContentDir": "dist/static",  "packOutputDir": "target",  "modulePaths": {      "src/server/*.ts": "dist/server/*.js",    },  "staticContentPaths": {      "src/client/*.html": "dist/static/*.html",    },  "ignoreTransformTableList": ["ua_table_licensing_config", "sys_embedded_help_role"],  "taxonomy": \{        "mapping": \{            "sys\_script": "scripts/server/rules",            "custom\_table": "my-custom-folder/my-nested-folder"        \},        "fallbackFolderName": "unclassified"     \}}

Related topics

Application access settings

Search documentation
Search document titles and file paths on the australia branch