Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

14 lines
510 B

const app = require("express")();
app.get("/", async (req, res) => {
fetch("https://api.my-ip.io/ip")
.then(response => response.text())
.then(body => {
res.send(`<body style="background: slategray; color: white; font-family: sans-serif; font-weight: bold; font-size: 4em; height: 100vh; display: flex; align-items: center; justify-content: center;">${body}</body>`);
});
});
const port = process.env.PORT || 8080;
app.listen(port, () => console.log(`app listening on http://localhost:${port}`));