January 10, 2024, 23:32
sudo raspi-config, there you have to set that it automatically logs into the desktop. You can start Index.js with crontab (terminal). However, I would only run it 60 seconds after starting so that there are no problems when booting. But you'll have to look for it yourself, because I have to go.
30 6 1 /usr/local/bin/node /home/steve/example/script.js
man crontabat Terminal https://linuxhandbook.com/crontab/