FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
demo-javascript/server.js at anto-deepsource-patch-89 · anto-deepsource/demo-javascript · GitHub
anto-deepsource
/
demo-javascript
Public
forked from
moulik-deepsource/demo-javascript
Notifications
You must be signed in to change notification settings
Fork
2
Star
0
Code
Pull requests
232
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
demo-javascript
/
server.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (17 loc) · 689 Bytes
Breadcrumbs
demo-javascript
/
server.js
Copy path
File metadata and controls
25 lines (17 loc) · 689 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const
express
=
require
(
'express'
)
;
const
request
=
require
(
'request'
)
;
// request is deprecated. Prefer using `axios` instead
const
helmet
=
require
(
'helmet'
)
const
app
=
express
(
)
;
// Sensitive
app
.
use
(
helmet
.
expectCt
(
{
enforce
:
false
// Sensitive. It should be true
}
)
)
request
(
'http://www.google.com'
,
function
(
error
,
response
,
body
)
{
console
.
error
(
'error:'
,
error
)
;
// Print the error if one occurred
console
.
log
(
'statusCode:'
,
response
&&
response
.
statusCode
)
;
// Print the response status code if a response was received
console
.
log
(
'body:'
,
body
)
;
// Print the HTML for the Google homepage.
}
)
;
app
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
send
(
'hello'
)
}
)
;
Back
|
FazBrowse Home
|
New Git URL