Skip to content
Release: Australia · Updated: 2026-03-20 · Official documentation · View source

Custom application configuration in source code

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

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.

Application configuration in source code

{
  "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

sndocs is an independent community mirror and is not affiliated with or endorsed by ServiceNow.

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

© 2026 ServiceNow, Inc. All rights reserved.

Documentation content is redistributed under the Apache License 2.0 from the ServiceNowDocs repository.

ParameterTypeDescription
appOutputDirStringDirectory to output the build artifacts to for packaging. The pack and install commands refer to this directory to package the artifacts. Default: `dist/app`
clientDirStringDirectory containing the client-side files for developing user interfaces with React.Default: `src/client`
dependenciesObjectThe 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.
"dependencies": {
    "<scope>": {
      "<type>": ["<sys_id or name>"],
      ...
    },
    ...
}
For more information, see Download ServiceNow Fluent application dependencies.
excludeFilePatternsArrayA 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.
fluentDirStringDirectory containing ServiceNow Fluent files \(`.now.ts`\) that define application metadata in source code.Default: `src/fluent`
generatedDirStringDirectory 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
ignoreTransformTableListArrayA list of tables to ignore when transforming application metadata into source code.
linterObjectA 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:
"linter": {
  "module": {
    "enabled": true
  }
}
metadataDirStringDirectory containing the application's metadata as XML files.Default: `metadata`
modulePathsObjectA 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.
packOutputDirStringDirectory to output the installable package \(`.zip` file\) when building the application. The install command refers to this directory to install the package.Default: `target`
serverModulesDirStringDirectory containing the JavaScript or TypeScript files to be built into JavaScript modules for use in server-side scripts.Default: `src/server`
serverModulesExcludePatternsArrayA list of file patterns to exclude when building JavaScript modules.Default:
[
  "**/*.test.ts",
  "**/*.test.js",
  "**/*.d.ts"
]
serverModulesIncludePatternsArrayA list of file patterns to include when building JavaScript modules.Default:
[
  "**/*.ts",
  "**/*.tsx",  
  "**/*.js",
  "**/*.jsx",
  "**/*.cts",
  "**/*.cjs",
  "**/*.mts",
  "**/*.mjs",
  "**/*.json"
]
staticContentDirStringDirectory to output the static asset files used for developing user interfaces.Default: `dist/static`
staticContentPathsObjectA map of the client-side source files to the output paths for static asset files.
defaultLanguageStringThe 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
tableOutputFormatStringThe 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 `` 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`
taxonomyObject

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.

"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.

trustedModulesArray

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

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/*'.
tsconfigPathString

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: .