Shitty-IP-grabber/index.js

18 lines
378 B
JavaScript
Raw Normal View History

2024-12-04 15:03:03 -06:00
const express = require("express")
const PORT = process.env.PORT || 8080
var app = express()
app.listen(PORT, () => {
console.log("Shit ass dumb ip grabber is on port " + PORT)
})
2024-12-04 15:11:47 -06:00
app.use
2024-12-04 15:07:00 -06:00
2024-12-04 15:03:03 -06:00
app.get("*", (req, res) => {
2024-12-04 15:15:34 -06:00
var IP = req.headers['x-real-ip']
2024-12-04 15:11:47 -06:00
var IPtext = "This motherfucker's IP is " + IP
console.log(IPtext)
res.send(IPtext + ", probably!")
2024-12-04 15:03:03 -06:00
})