I have an executable server file written in Golang which is ran by a custom script file, located in /etc/init.d/ directory on my Raspberry Pi 3B. The server starts but doesn't display the website I made in HTML. This website is located in a "static" folder in the same directory as my server executable.
I used this command to build the server.go into an executable.
go build server.go
NOTE
If I start the server manually by double-clicking it, the website works fine (my server displays the "static" folder).
My static folder consists of html, javascript and css files.
I think the problem is that when I start the server by a script, the static folder is not found by the server (displays: 404 page not found).
I would also like that the script is started whenever the RPi is booted.
I wrote the script following this site: https://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html
Any help would be appreciated.