Closed YutHelloWorld closed 7 years ago
Hi,thx very much for this project. I have a question about how browser gets favicon.ico? I did not see server-favicon or app.use(favicon(...)) anywhere. In server/main.js, i find these code works for favicon.
server-favicon
app.use(express.static(path.resolve(project.basePath, 'public'))) app.use('*', function (req, res, next) { const filename = path.join(compiler.outputPath, 'index.html') compiler.outputFileSystem.readFile(filename, (err, result) => { if (err) { return next(err) } res.set('content-type', 'text/html') res.send(result) res.end() }) })
but i don't konw how it works .Could u get a explanation? thx very much!
I find this FQA at https://stackoverflow.com/questions/35408729/express-js-prevent-get-favicon-ico . maybe is the answer!
Hi,thx very much for this project. I have a question about how browser gets favicon.ico? I did not see
server-favicon
or app.use(favicon(...)) anywhere. In server/main.js, i find these code works for favicon.but i don't konw how it works .Could u get a explanation? thx very much!