I have the following code in Express which redirects to views/index.html page. Now I also want to send some integers to index.html as soon as some function is executed in this code. Whats the fastest way to do this?
const app = express()
var path = __dirname + '/views/'
var router = express.Router()
app.use('/',router)
router.get('/',function(req,res)
{
res.sendFile(path+'index.html')
}
)
app.listen(3000)