KrakenJS - How to set Favicon?

258 views Asked by At

I've looked into this issue, but to no avail.

app.use(express.favicon('/path/to/icon/')) also does not seem to work.

2

There are 2 answers

3
Farid Nouri Neshat On

Assuming you are using express 4.x, express.favicon is no longer bundled with express. You should be using serve-favicon module or something similar:

var favicon = require('serve-favicon');
app.use(favicon('/path/to/icon/'));
1
Sgnl On

in your project's /node_modules/express/bin/express folder add the path to your favicon inside of , 'app.use(express.favicon());'

for example:

, 'app.use(express.favicon('path/to/fav/icon));'