Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have set the static folder to access images
app.use('/images', express.static(path.join(`assets/images`)))
and image is being stored successfully via multer and path assigned as
diskStorage({
destination: (req, file, callback) => {
callback(null, 'assets/images')
but getting error
and I tried to skip this error by adding a route
this.app.get('/favico.ico', (req, res) => {
res.sendStatus(204);
but nothing worked until now
Update
Having this problem on localhost but working fine on Heroku
I have found another reason, I run my node app on 192.168.X.X
instead of localhost and got my image loaded
Now what can the problem that I am unable to get it on localhost
One more justification for that I am unable to host angular 7
app on localhost
but can run on 192.168.X.X
Why is that? How to solve this?
Actually there was an issue in my browser
configuration after resetting the browser
settings and all that it got OK.
A complete solution and discussion lies here
Connection refused: localhost:4200 favicon.ico 502 in angular 7
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.