How to bring GenieACS on "dev" mode

Hi,

I’m sorry if this is more a NodeJS question than a GenieACS one, but does some knows how do I bring a “live”/“dev” environemment so I can rapidly see the changes I make on the code?

Like I’m used to code on ReactJS and when I do
“npm start” it will launch the website and I can just hotload new changes and see console.log() statements directly on my console.

Is there something similar I can do with GenieACS?

Thanks

You need to be more explicit about what code you are changing. The Rails UI? An extension script? Provision script? VirtualParameters script?

-dan

I want to experiment with files under the /lib directory (like lib/cwmp.ts and lib/config.ts ). I want to change the source code and have a faster feedback , instead of needing to run “npm run build” and than restart services

I didn’t find exactly what I was looking for, but got to see what I wanted.

Under:
build/build.ts
I changed const MODE = process.env[“NODE_ENV”] || “production”;
to
I changed const MODE = process.env[“NODE_ENV”] || “development”;

Added env variable under /opt/genieacs/genieacs.env
NODE_ENV=development

Rebuilt code (npm run build)

Now I can see unminified code under dist/bin. And also the exception stack AND console.log() can be seen under /var/log/daemon.log

So this was enough to find the bug I was facing, but I was making changes on my bundled code (dist/bin/genieacs-cwmp) instead of (what was my initial purpose) to change it on source code (lib/cwmp.ts)

1 Like