I have a variable in server.js that holds the name of a folder. I want to use that variable in an other file, how to do that?
the below variable is called obj which is in server.js file:
app.post('/api/v1/upload', upload.array('image', 1), (req, res) => {
const obj = JSON.parse(JSON.stringify(req.body));
now I want to use this variable with its value in another file say upload.js.
how to do that?