.slider__item {
color: #fff;
text-align: center;
padding: 70px 10px;
}
.slider__item a {
width: 100%;
height: 100%;
display: block;
}
.slider__item-title {
margin: 10px 0 7px;
font-size: 25px;
font-weight: 500;
}
.a {
width: 100%;
height: 100%;
display: block;
}
app.use(express.json({ extended: true }))
app.post("/index", async(req, res) => {
let dif = req.body.name;
let sqlsearch = `SELECT idkp, kp FROM autdb.kp2022 where kp like '%${dif}%' limit 0,10;`;
if (dif.length >= 4) {
pool.query(sqlsearch)
.then(data => {
let datafm = data[0]
let hint = "";
let dl = data[0].length
for (i = 0; i < dl; i++) {
hint = hint + `${datafm[i].kp} ${datafm[i].idkp} <br>`
}
res.status(200).json({ hint })
})
} else {
res.status(403).json({ message: 'Меньше 4-х символов' })
}
})