const express = require(“express”)
const app = express()
app.use("/" , express.static(__dirname + “/public”))
function decodeQuerybase64 (req,res,next) {
console.log(req.query)
console.log(typeof req.query)
for(let q in req.query){
let data = req.query[q]
data = new Buffer.from(data,‘base64’).toString(‘ascii’)
req.query[q]=data
}
next()
}
app.get("/eval", decodeQuerybase64 ,(req,res) => {
console.log(req.query)
res.send("========================eval request==================")
})
app.listen(3333 , () => {
console.log(“server Started in http://localhost:3333”)
})
DOUBT:- I dint understand what arnav bhaiya did in decodeQuerybase64 function. Like why we are making a for loop and what does that Buffer means and does