Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
136
rated 0 times [  142] [ 6]  / answers: 1 / hits: 137659  / 11 Years ago, sun, march 17, 2013, 12:00:00

I recently started working in Node.js and in the app.js file there is this line:



app.use(express.favicon());


Now, how do I set up my own custom favicon.ico?


More From » node.js

 Answers
8

No extra middlewares required. Just use:



app.use('/favicon.ico', express.static('images/favicon.ico'));

[#79538] Friday, March 15, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
irvingcarloe

Total Points: 677
Total Questions: 109
Total Answers: 96

Location: Svalbard and Jan Mayen
Member since Sun, Sep 25, 2022
2 Years ago
irvingcarloe questions
Wed, Mar 31, 21, 00:00, 3 Years ago
Tue, Aug 4, 20, 00:00, 4 Years ago
Fri, Jul 3, 20, 00:00, 4 Years ago
;