Can we get the variables in the query string in Node.js just like we get them in $_GET in PHP?
$_GET
I know that in Node.js we can get the URL in the request.
It actually simple:
const express= require('express'); const app = express(); app.get('/post', (req, res, next) => { res.send('ID:' + req.query.id + ' Edit:'+ req.query.edit); }); app.listen(1000); // localhost:1000/post?id=123&edit=true // output: ID: 123 Edit: true