Answer the question
In order to leave comments, you need to log in
How to output string from mongodb?
Hello everyone, I added data to the database that I can’t display correctly on ejs!
Here's how I get data from the database:
app.get('/ads/check',async (req,res,next) => {
await Ads.find({}).then(result => {
const login = req.session.login
res.render('check', {
title: "Ваша рекламa на сайте!",
login: login,
result
})
})
})
var ads = new Schema({
name: String,
iframe: String
})
var Ads = mongoose.model('Ads', ads)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question