DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
πŸΈπŸ’» - 🏺
πŸΈπŸ’» - 🏺

Posted on

Securely transfer data to client from server application

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)

Take a look at this:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›