Shopify / shopify-cli

Shopify CLI helps you build against the Shopify platform faster.
https://shopify.dev/tools/cli
Other
1.01k stars 201 forks source link

How to access the images from images directory placed at root #2659

Closed avinashbrst closed 1 year ago

avinashbrst commented 2 years ago

Please confirm that you:

What type of project are you working on?

app

Expected behavior

Hi, I have created a images folder at shopify CLI root and then try to access the image on path like: https://abc.com/images/xyz.png like this. But its not getting the path and not open. So let us know how can we do that.

Actual behavior

Hi, I have created a images folder at shopify CLI root and then try to access the image on path like: https://abc.com/images/xyz.png like this. But its not getting the path and not open. So let us know how can we do that.

Stack trace

Hi,
I have created a images folder at shopify CLI root and then try to access the image on path like:
https://abc.com/images/xyz.png like this. But its not getting the path and not open. So let us know how can we do that.

Reproduction steps

  1. Create a images folder at root
  2. use code like app.use(express.static(path.join(__dirname, 'public')))
  3. Then run npm run dev and try to see the image in Browser like https://abc.com/images/xyz.png
  4. Not open the image

Operating System

Ubuntu

CLI version (run shopify version if you're not sure)

3.2

Shell

No response

Ruby version (run ruby -v if you're not sure)

ruby 3.1.2p20

What language and version are you using in your application?

Node 16.4, ruby 3.1.2p20

github-actions[bot] commented 1 year ago

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.

→ If there's no activity within a week, then a bot will automatically close this.

Thanks for helping to improve Shopify's dev tooling and experience.