Skip to content

Commit 8f2c035

Browse files
committed
添加favicon
1 parent 346ad00 commit 8f2c035

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const bodyParser = require('body-parser');
66
const session = require('express-session');
77
const MongoStore = require('connect-mongo')(session);
88
const fs = require('fs');
9-
// const proxy = require('proxy-middleware');
9+
const favicon = require('serve-favicon');
1010

1111
const dbUrl = require('./config/db').url;
1212

@@ -39,7 +39,7 @@ app.use(session({
3939
app.use(cookieParser(secret));
4040

4141
// uncomment after placing your favicon in /public
42-
// app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')))
42+
app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
4343
app.use(logger('dev'));
4444
app.use(bodyParser.json());
4545
app.use(bodyParser.urlencoded({ extended: false }));

server/public/favicon.ico

4.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)