Skip to content

Commit 2edb2a3

Browse files
committed
Add POST form aspect.
1 parent f8647a2 commit 2edb2a3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ app.get("/", async (req, res) => {
1717
res.render("index.html.ejs", { version: "1.0.1" });
1818
}
1919
});
20-
app.post("/", (req, res) => {});
20+
app.post("/", (req, res) => {
21+
mf2.get({ baseUrl: req.body.url, html: req.body.html }, (err, data) => {
22+
res.send(err || data);
23+
});
24+
});
2125

2226
app.listen(port, () => {
2327
console.log(`Example app listening on port ${port}`);

0 commit comments

Comments
 (0)