How can I set (point) a certain physical path with the locahost?

11 Views Asked by At

I can reach localhost, but I need to set localhost:<port_no> for a certain path on my MacOS computer.

For an example,

when I enter localhost:5001, (or 192.168.1.5:5001) I will access to : /Users/mycomputer/mydevprojects/sampledir so when I enter 192.168.1.5:5001/myimages , it will go to /Users/mycomputer/mydevprojects/sampledir/myimages folder and I will be able to access any file under /Users/mycomputer/mydevprojects/sampledir/myimages folder, such as /Users/mycomputer/mydevprojects/sampledir/myimages/sampleimage1.png for 192.168.1.5:5001/myimages/sampleimage1.png

I need this to be able to reach to the images (or files) at this path from my mobile application.

Any idea?

I could not find appropriate solutions for Mac OS (ventura). When I enter localhost:5001, it doesnt take me to a certain path. But my app such as my webapi works at localhost:5000/api/... address.

0

There are 0 best solutions below