Shitty-IP-grabber/index.js

18 lines
No EOL
384 B
JavaScript

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)
})
app.use
app.get("*", (req, res) => {
var IP = req.headers['x-forwarded-for']
var IPtext = "This motherfucker's IP is " + IP
console.log(IPtext)
res.send(IPtext + ", probably!")
})