How to use KPI development workflow the right way?

Dear community and kobo devs!

I would like to ask you if anyone can help me please with setting up my dev. workflow for the KPI part of the application. My steps so far are following:

  • Use –setup to enter dev-mode
  • Make change in the code
  • Re-build the container with –buld-kpi
  • Restart configuration

It’s obvious that rebuilding the whole container is not most optimal way to test my new build.
I can execute npm run watch inside of the kpi container but how i would reach web-dev-server to see my changes?

Thank you
With Regards

Have you been able to figure out a solution? If so, could you perhaps post it here for posterity [hint, hint… :wink: ]

1 Like

Sorry this isn’t documented better. If you change Python code, that’s handled by runserver_plus, which kobo-install’s developer mode turns on for you (in place of uWSGI).

For front-end code, try ./ -cf run --publish 3000:3000 kpi npm run watch. This will be fast if Linux is your host but slower if it’s macOS, due to the way Docker’s disk volumes work. It’s possible to start npm run watch on your host OS instead of within a Docker container as well; ping me or @magicznyleszek if you need help with this.