I have an application written in node. One of the pages is a form for users to enter data. When they submit that data, my app generates a response. I want to send that data to the client on a separate page. How do I do this? It must be secure.
const express = require('express');
const app = express();
app.post('/join', (rq, rs) => {
let data = generateResponse(rq.query.foo, rq.query.bar);
// transfer info here
}
app.get('/game', (rq, rs) => {
//retrieve info here
rs.render('game');
}
My app uses EJS for rendering if that helps.
Top comments (0)