Is there some secret to serving static images out of my_app/public
?
I created a folder called public
under the root directory of my app, but any images I load into that folder are not accessible from localhost:3000/my_image.jpg
, or natively from within App.jsx
.
I’m using Meteor 1.4.2.3 with React as the front end on a local Ubuntu 16.04 VM.
Am I missing a step? Not getting an error, it just redirects to the app homepage.
It sounds like you are trying to load a server route from the client. Unless you also have some server routing included, or a client route which can deliver that asset, your client will just ignore this.
I just assumed /public
was a Meteor primitive and its assets would be publicly available by default. What kind of server- or client-side routing do I need to do to make /public
assets accessible?
I’ve looked over other Meteor React projects on GitHub and I don’t see anything explicitly routing content to or from /public
but maybe I’m missing something?
Ah…never mind. It was an error in my setup, not a config issue in Meteor. My bad.
Never mind…