This is my express app running on Node.js
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('id: ' + req.query.id);
});
app.listen(3000);
console.log('working...');
//so i need url id as var
var gotID = req.query.id
//want to use this data to another js file
module.exports = gotID;
So I want that URL id as my variable.
Which is look like this URL
http://localhost:3000/[id that i want]
So what should I do?
I'm new to Node.js