Hey guys just started with nodejs and express so i came up with the situation where i want to send my data to my GET req from my POST req.Here is the code below for you to understand
app.post('/run-time',(req,res)=>{
const stoptime=req.body.stop
const plannedtime=req.body.planned
const runtime=plannedtime-stoptime
res.redirect('/run-time')
})
this is my POST req where i fetched the values from the form and then calculated the 'runtime' now then i have to redirect to specific GET route
app.get('/run-time',(req,res)=>{
})
so what i want is send the 'runtime' variable calulated in my POST req to my GET req here ..how can i do this ?