exports.varifyUser = (req, res, next) => {
const db = getDb();
var data = req.body;
req.session.email = data.email;
console.log("seer", req.session);
console.log(">>>>", data);
console.log("uLog", db.collection('userLogin').insertOne({email:data.email,password:'12345'}));
Singup
.fetchAll()
.then(result => {
res.render('desbord', {
title: 'Desbord',
data: result
});
})
.catch(error => {})
};
view/desbord.pug
extends partial/Templet.pug
block body
h Desboard
p #{JSON.stringify(data)}
p Lenght:#{data.length}
ul
each lst in data.length?data:[' No User Found ']
li=lst.name
partial/templet.pug
<!DOCTYPE html>
html(lang="en")
head
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible", content="ie=edge")
title Document
block style
body
block body
No comments:
Post a Comment