Skip to content

Commit

Permalink
favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
thejatingupta7 committed Oct 5, 2024
1 parent be1ff59 commit e36898d
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
12 changes: 12 additions & 0 deletions controllers/middleware.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express');
const favicon = require('serve-favicon');
const path = require('path');

const app = express();

// Serve the favicon from the 'public' folder
app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));

// Other routes and middleware...

app.listen(3000);
44 changes: 43 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"lodash": "^4.17.21",
"mongoose": "^7.6.3",
"passport": "^0.6.0",
"passport-local-mongoose": "^8.0.0"
"passport-local-mongoose": "^8.0.0",
"serve-favicon": "^2.5.0"
},
"devDependencies": {
"nodemon": "^3.0.1",
Expand Down

0 comments on commit e36898d

Please sign in to comment.