File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 12
12
"dependencies" : {
13
13
"dotenv" : " 16.3.1" ,
14
14
"express" : " 4.18.2" ,
15
+ "helmet" : " 7.0.0" ,
15
16
"nunjucks" : " 3.2.4"
16
17
},
17
18
"devDependencies" : {
18
19
"@types/express" : " 4.17.17" ,
20
+ "@types/node" : " 20.3.3" ,
19
21
"@types/nunjucks" : " 3.2.3" ,
20
22
"eslint" : " 8.44.0" ,
21
23
"nodemon" : " 2.0.22" ,
Original file line number Diff line number Diff line change 1
1
import dotenv from 'dotenv'
2
-
3
2
import express from 'express'
4
3
import nunjucks from 'nunjucks'
4
+ import helmet from 'helmet'
5
5
import routes from './routes'
6
6
7
7
dotenv . config ( )
8
8
9
9
const port = process . env . PORT ?? 3000
10
10
const app = express ( )
11
11
12
+ app . use ( helmet ( ) )
13
+
12
14
nunjucks . configure ( 'src/views' , {
13
15
autoescape : true ,
14
16
express : app
Original file line number Diff line number Diff line change 174
174
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a"
175
175
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==
176
176
177
- " @types/node@* " :
177
+ " @types/node@*" , "@types/node@20.3.3" :
178
178
version "20.3.3"
179
179
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.3.tgz#329842940042d2b280897150e023e604d11657d6"
180
180
integrity sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==
@@ -484,7 +484,7 @@ doctrine@^3.0.0:
484
484
dependencies :
485
485
esutils "^2.0.2"
486
486
487
- dotenv@^ 16.3.1 :
487
+ dotenv@16.3.1 :
488
488
version "16.3.1"
489
489
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
490
490
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
@@ -812,6 +812,11 @@ has@^1.0.3:
812
812
dependencies :
813
813
function-bind "^1.1.1"
814
814
815
+ helmet@7.0.0 :
816
+ version "7.0.0"
817
+ resolved "https://registry.yarnpkg.com/helmet/-/helmet-7.0.0.tgz#ac3011ba82fa2467f58075afa58a49427ba6212d"
818
+ integrity sha512-MsIgYmdBh460ZZ8cJC81q4XJknjG567wzEmv46WOBblDb6TUd3z8/GhgmsM9pn8g2B80tAJ4m5/d3Bi1KrSUBQ==
819
+
815
820
http-errors@2.0.0 :
816
821
version "2.0.0"
817
822
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
You can’t perform that action at this time.
0 commit comments