FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expresscpp/test/basic_.js at master · expresscpp/expresscpp · GitHub
expresscpp
/
expresscpp
Public
Notifications
You must be signed in to change notification settings
Fork
15
Star
96
Code
Issues
5
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
expresscpp
/
test
/
basic_.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (20 loc) · 488 Bytes
Breadcrumbs
expresscpp
/
test
/
basic_.js
Copy path
File metadata and controls
22 lines (20 loc) · 488 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
const
express
=
require
(
'express'
)
;
const
app
=
express
(
)
;
const
fetch
=
require
(
'node-fetch'
)
;
const
assert
=
require
(
'assert'
)
;
app
.
get
(
"/"
,
(
req
,
res
)
=>
{
res
.
send
(
"/"
)
}
)
const
port
=
8082
;
const
server
=
app
.
listen
(
port
,
(
)
=>
{
fetch
(
`http://localhost:
${
port
}
/`
)
.
then
(
async
(
r
)
=>
{
const
response
=
await
r
.
text
(
)
;
assert
(
response
===
"/"
)
;
server
.
close
(
)
;
}
)
.
catch
(
(
e
)
=>
{
console
.
error
(
'ERROR: '
+
e
)
assert
(
false
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL