How to serve custom app?

Hi all,
I am looking into the possibilities to customize OpenRemote, first the Manager UI.
The Custom project repository template was pulled, and I used the instructions on Developer-Guide UI-apps-and-components and that works fine (using Windows with Docker Desktop), the manager is served via the npm serve command from openremote/ui/app/manager.
But what I fail to grasp is how to start the ui/app/custom (which is sitting in the custom project template).
I tried the same npm command in that directory, but to no avail.
Could you please point me in a direction?

Thank you!

You should indeed be able to run ‘npm run serve’ in the ‘ui/app/custom’ directory but make sure to run the following from the custom project root directory first:

‘’’
yarn install
‘’’

If still not working please share console output.

Thank you Rich!
What I did:

  • stopped and deleted all existing containers in Docker
  • Adjusted the package json there to
{
  "packageManager": "yarn@3.2.0",
  "private": true,
  "workspaces": [
    "openremote/ui/util",
    "openremote/ui/app/*",
    "openremote/ui/component/*",
    "openremote/ui/demo/*",
    "ui/util",
    "ui/app/*",
    "ui/component/*",
    "ui/demo/*"
  ],
  "dependencies": {
    "@openremote/core": "workspace:*",
    "@openremote/manager": "workspace:*",
    "@openremote/or-app": "workspace:*",
    "@openremote/or-mwc-components": "workspace:*"
  },
  "devDependencies": {
    "@openremote/util": "workspace:*",
    "lerna": "^4.0.0"
  }
}
  • yarn install
  • gradlew clean installDist in root Custom project root dir
  • npm run serve – --env config=…/…/…/deployment/manager/app in the ui/app/custom dir (and manager_config.json in the right dir, and an .env file in the root)

This not give any errors, it spins up localhost (on 8080, not 9000 though), but I had expected to see a custom page entry in the header and a custom page with that, but I just see the regular ones (and also login remains at admin/secret, no custom/custom)

What do I miss / am I doing wrong?
Thanks again!
For completeness the console output here:

stef@LE2237 MINGW64 /c/__Projects/OpenRemote/ui/app/custom (main)
$ npm run serve -- --env config=../../../deployment/manager/app

> @openremote/custom@1.0.0 serve
> npx tsc -b --clean && npx shx rm -rf dist && npx orutil build && npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --mode development --env config=../../../deployment/manager/app

Running gradlew modelBuild task in C:\__Projects\OpenRemote ...
gradlew modelWatch finished! Status = 0

To customise the URL of the manager and/or keycloak use the managerUrl and/or keycloakUrl
 environment arguments e.g:

npm run serve -- --env managerUrl=https://localhost
npm run serve -- --env keycloakUrl=https://localhost/auth

MANAGER URL: http://localhost:8080
KEYCLOAK URL: undefined

CUSTOM_CONFIG_DIR: ../../../deployment/manager/app
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9000/
  ./src/pages/page-custom.ts 1.76 KiB [built] [code generated]
  ./util.inspect (ignored) 15 bytes [built] [code generated]
webpack 5.77.0 compiled successfully in 40001 ms
assets by status 16.7 MiB [cached] 479 assets
assets by status 25.2 MiB [emitted]
  asset bundle.93c3e090cfe428ba561f.js 25.2 MiB [emitted] [immutable] (name: bundle)
  asset index.html 3.57 KiB [emitted]
cached modules 8.56 MiB [cached] 1242 modules
runtime modules 2.54 KiB 10 modules
javascript modules 892 KiB
  modules by path ../../../openremote/ui/component/ 857 KiB 55 modules
  modules by path ../../../openremote/ui/app/manager/lib/ 32.2 KiB
    modules by path ../../../openremote/ui/app/manager/lib/*.js 4.1 KiB
      ../../../openremote/ui/app/manager/lib/headers.js 3.18 KiB [built]
      ../../../openremote/ui/app/manager/lib/routes.js 945 bytes [built]
    modules by path ../../../openremote/ui/app/manager/lib/pages/*.js 28.1 KiB
      ../../../openremote/ui/app/manager/lib/pages/page-assets.js 13.9 KiB [built]
      ../../../openremote/ui/app/manager/lib/pages/page-map.js 14.2 KiB [built]
  ../../../openremote/node_modules/moment/locale/ sync ^\.\/.*$ 3.21 KiB [optional] [built]
webpack 5.77.0 compiled successfully in 3648 ms