Error: ENOENT, open favicon.ico

后端 未结 1 1155
醉酒成梦
醉酒成梦 2021-01-19 21:26

I am newbie with node and express

I created a express sample project by first writing

express test1

then i did

np         


        
相关标签:
1条回答
  • 2021-01-19 21:58

    Append this line into the initialization section of your app.js:

    app.use(favicon(__dirname + '/public/favicon.ico'));
    

    I assume that app.js is in the project directory and favicon file is at public/favicon.ico also relative to the project folder.

    0 讨论(0)
提交回复
热议问题