Skip to content

Instantly share code, notes, and snippets.

@BlackYoup
Created June 18, 2020 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlackYoup/378789f68377ae798c2e662f804acdbd to your computer and use it in GitHub Desktop.
Save BlackYoup/378789f68377ae798c2e662f804acdbd to your computer and use it in GitHub Desktop.
require("express")().get("*",(_,r)=>{
console.log(process.env.PORT||1016);
r.send(`
<html>
<title>Hello</title>
<body>
<h1>Hello world</h1>
<form method="POST" action="/action">
<input type="text" name="cookie" value="<Long value here, something like 4kb would do"/>
<input type="submit" value="submit"/>
</body>
</html>
`);
r.end();
}).post("*", (req, res) => {
console.log(req.headers);
res.status(200);
res.end();
}).listen(process.env.PORT || 1026)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment