From 740c559b38c0d8a35ee17430c384eee882e1a9fe Mon Sep 17 00:00:00 2001 From: Kei Son Date: Wed, 30 Oct 2019 16:30:30 +0900 Subject: [PATCH] feat: favicon (#70) --- package-lock.json | 24 ++++++++++++++++++++++++ package.json | 1 + public/favicon.ico | Bin 0 -> 15406 bytes src/app.ts | 2 ++ 4 files changed, 27 insertions(+) create mode 100755 public/favicon.ico 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 0000000000000000000000000000000000000000..22dca44668f70965ca398fa515d6adb460540748 GIT binary patch literal 15406 zcmeI(Jxc>Y5P;$Fqp^#if}nDh#4ZpK0*W74Xo5;0g*KvsB8n*Z2P`aYtn4f-Yy=zO z5OOv-5DZ5OJFz${5)iRWr>?WaUl5D)%sVhFw|B$NJ;fFaE7B$%l1PY-j%;^|jERWj zG@g^)BIi1nO8vYa7P;>gN$NLRq7{vK9S8&v_+tVKf$7nf+M8`_!wbXw(OF-!^}nsN z`;4PGrD^vk0s#aNKmY**5I_I{1Q0*~fhYx*%4RTIF{7ExKvxuf%=z`|Zt>}B_V9Q- ziuEV2p4}7wvATLu9ExK7R$tSeljsqxtZ8yiq6h>62q1s}0tg_000IagfB*srAbBU>Q3GCe}0)dth_y$1TM&JMd literal 0 HcmV?d00001 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());