Skip to main content

Deploying the application to a subpath

When you want to deploy to a sub-path on your domain like www.netconomy.net/app1 and app1 is the sub-path you have two possible ways to do that.

  1. configure app.route.prefix in environment/{config}.ts
  2. configure app.asset.path in environment/{config}.ts
  3. configure cli.optimization.asset in ncc.conf.json

The configuration in archibald.conf.json is static and can be overridden with the environment config. It is also possible to use the {{ENV_KEY|fallback}} syntax.

The prefix option always works the asset config only if you turn it active true.

Option 1

When configuring a route prefix every route, link and asset will get that path appended.

Option 2

The asset.path option only changes asset paths, like images, fonts, css and js. When configuring cli.asset there are two options realtive and absolute config.

  1. Static Is active when host is set, then it statically takes protocoll, host, port and path from the config. the path part can be overridden through the app.asset.path environment config.
  2. Dynamic Is active when host is not set, then it takes app.asset.path first and cli.optimization.asset as fallback.

Both options are being combined. So if prefix and asset are configured they generate an url like {prefix}{asset}