How to include a file in a Jade template which might not be here

I had the problem that I had to include a Jade template from the filesystem which was optional: if it’s here, use it, otherwise just ignore it. Jade does neither¬†allow conditional includes nor includes of non existing files. The solution for my problem was rendering the file in the code and passing the HTML to
Continue reading How to include a file in a Jade template which might not be here

Run node applications on your QNAP using PM2

After installing node I wanted to start my node applications automatically after rebooting. Therefore i use the PM2 process manager with a process file which will be started everytime the system boots. The challenge of using PM2 in autorun.sh was the fact, that the home directory for root changes from ‘/’ to ‘/root’ after booting
Continue reading Run node applications on your QNAP using PM2