diff --git a/package-lock.json b/package-lock.json index eda6f89e..6f213c13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3270,6 +3270,30 @@ } } }, + "serve-favicon": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", + "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=", + "requires": { + "etag": "~1.8.1", + "fresh": "0.5.2", + "ms": "2.1.1", + "parseurl": "~1.3.2", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", diff --git a/package.json b/package.json index 9b06b051..9fafb301 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "morgan": "^1.9.0", "pug": "^2.0.3", "reveal.js": "^3.7.0", + "serve-favicon": "^2.5.0", "superagent": "^5.0.2" }, "devDependencies": { diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100755 index 00000000..22dca446 Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/app.ts b/src/app.ts index cdcfca63..c93d4ed7 100644 --- a/src/app.ts +++ b/src/app.ts @@ -3,6 +3,7 @@ import * as path from 'path'; import * as logger from 'morgan'; import * as cookieParser from 'cookie-parser'; import * as bodyParser from 'body-parser'; +import * as favicon from 'serve-favicon'; import { router as routes } from './routes/index'; import { router as users } from './routes/users'; @@ -14,6 +15,7 @@ app.set('views', path.join(__dirname, '../views')); app.set('view engine', 'pug'); app.use(logger('dev')); +app.use(favicon(path.join(__dirname, '/public/favicon.ico'))) app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser());