When I started to learn about backend I thought that node.js would be perfect, it's popular, everyone loves it and the idea of having js both on the front-end and back-end was just great. Unfortunately I ran into some problems: Every crash course I watched ended with showing the http module and eventually hosting the script on heroku. This made me thinking: "Isn't it reinventing the wheel?" - I know there is express but that is different. Back to the time when I was only a front-end developer to host a site I was just using an ftp to upload my HTML, CSS and js files to the server and after that when I visited the domain there were all of them. This conflicts with making a server with node, so my question is am I trying to use node not where I should? I don't even know if putting node scripts on a web hosting like that would work.
To explain better my problem here's an example: Let's say I am making a simple image gallery. I would use a back-end technology to make an image uploading system and to tell the client side js how many images are in the gallery (something would just count files in the image folder) - Is node the right tool for that or should I use other technologies such as PHP?