18 lines
No EOL
416 B
JavaScript
18 lines
No EOL
416 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'] || req.connection.remoteAddress
|
|
var IPtext = "This motherfucker's IP is " + IP
|
|
console.log(IPtext)
|
|
res.send(IPtext + ", probably!")
|
|
}) |