Specify build directory for frontend of web service


I am trying to deploy a web service I have built (MERN stack app), and as part of deployment I evoke a command to create a production build directory.

However, when I view the sources of my web service using Dev Tools, I still see all my assets, folder structure, etc., which does not match the minified assets I have in my build directory.

When writing this post, I came across this past thread , and from my understanding, one of its largest takeaways is that web services on Render do not contain any statically built assets.

Therefore, it is correct that there is no way to refer to my build directory in order to display static files on the frontend? Or, is the conclusion of the linked thread that Render will not make those assets, but there is a way to refer to them on the developer’s end?


Hi mattc50,

That is correct, if you’re running a web service, it’s up to you (and your framework of choice) to handle serving any static assets.

I might start here https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/Introduction#serving_static_files for some initial inspiration, though I’m sure there are plenty of other options for accomplishing this task.

Hope this helps.



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.