route works in localhost, but not in hosting platform

Viewed 29

Hello i am hosting my nodejs with express apps via a2 hosting.

Almost everything is working but the only big issue i am having is that for static folders to work on the hosting platform i need to do "./" for every static file but if i do that it wont work on localhost, which is annoying having to have two different files with diffrent routes. I am not amazing at routing, I attach pictures please give me hand as to which is the best way to fix it so its the same file so i can work on it in my localhost before compiling and updating it everytime.

I add pictures:

enter image description here

enter image description here

And here is what it looks like on the C-panel of the hosting platform that forces me to "./" every file in order for them to work. I am not seeing the difference.

enter image description here

Let me know if any more info is needed or give me any tips ! thanks

0 Answers
Related