Answers for "How to pass variables from js to html node"

0

How to pass variables from js to html node

var bodyParser = require('body-parser');
var express = require('express');
var app = express();

app.use(express.static(__dirname + '/'));
app.use(bodyParser.urlencoded({extend:true}));
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
app.set('views', __dirname);

app.get('/', function(req, res){
    res.render('index.html',{email:data.email,password:data.password});
});
Posted by: Guest on April-24-2020

Code answers related to "How to pass variables from js to html node"

Code answers related to "Javascript"

Browse Popular Code Answers by Language