Favicon added

This commit is contained in:
2022-05-30 19:19:10 -03:00
parent a2b47a861e
commit c9ab154460
3 changed files with 9 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
"express": "^4.18.1",
"firebase-admin": "^10.2.0",
"nodemon": "^2.0.16",
"path": "^0.12.7"
"path": "^0.12.7",
"serve-favicon": "^2.5.0"
}
}

BIN
public/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -1,3 +1,4 @@
//.env File config
require('dotenv').config();
const express = require("express");
@@ -5,11 +6,17 @@ const server = express()
const port = process.env.PORT || 3000
//Accept with JSON files
server.use(express.json())
//Serve public for CSS files
const path = require("path");
server.use(express.static(path.resolve('public')));
//Define favicon
const favicon = require('serve-favicon');
server.use(favicon(path.resolve('public/images/favicon.ico')));
const index = require('./routes/index.js')
server.use("/", index)