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?
You need to be more explicit about what code you are changing. The Rails UI? An extension script? Provision script? VirtualParameters script?
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.
I changed const MODE = process.env[“NODE_ENV”] || “production”;
I changed const MODE = process.env[“NODE_ENV”] || “development”;
Added env variable under /opt/genieacs/genieacs.env
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)