renderObject
Script
v3
Fork
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export
const
renderObject
=
(
req
:
express
.
Request
,
res
:
express
.
Response
,
object
=
{
}
)
=>
{
// return some html
const
json
=
JSON
.
stringify
(
object
,
null
,
2
)
;
res
.
send
(
`
<html>
<body>
<h1>val.town</h1>
<pre>
${
json
}
</pre>
</body>
</html>
`
)
;
}
;