Adding new routes to new applications

You can customize applications by adding new routes to new applications that you created. You use the schematics command to create the packages for each route and update the files within the application.

Procedure

  1. Open a terminal and go to the Order Hub code directory. The default location is devtoolkit_docker/orderhub-code.
  2. Go to the app-config.json file that is in the module that you want to customize.
  3. Add the new routes that you want to include in the application.
  4. In the terminal, go to the customized module directory.
  5. Run the following schematics command. This command creates the packages for each new route and update the necessary files within the application.
    ng g @buc/schematics:add-app-to-existing-monorepo --app-config-json app-config.json --module-short-name short-name-for-the-module --prefix selector-prefix --mode on-prem --is-custom-app=true
    The schematic supports the following options.
    --app--config-json
    This option is required. Use the existing app-config.json file in the module that you want to customize.
    --module-short-name
    The short name for the module. If the module name has dashes, then the short name is the text after the last dash. For example, if the module name is buc-app-settings, the module short name is settings.
    --prefix
    The HTML selector to use for the generated components. The default is buc.
    --mode
    Set to on-prem to generate code applicable for Sterling™ Order Management System on-premises deployments.
    --is-custom-app
    Indicates whether or not the current repository is a custom application. Use true to indicate that the current repository is a custom application, or use false for an existing Order Hub application. The default is false.
    For example,
    ng g @buc/schematics:add-app-to-existing-monorepo --app-config-json app-config.json --module-short-name monorepo --prefix monorepo --mode on-prem --is-custom-app=true

What to do next

Prepare to deploy, build, and test your customizations. For more information, see Preparing to deploy new applications.