Ð
Size: a a a
Ð
V
V
л
А
var mysql = require('mysql');
var pool = mysql.createPool(...);
pool.getConnection(function(err, connection) {
if (err) throw err; // not connected!
// Use the connection
connection.query('SELECT something FROM sometable', function (error, results, fields) {
// When done with the connection, release it.
connection.release();
// Handle error after the release.
if (error) throw error;
// Don't use the connection here, it has been returned to the pool.
});
});
Ð
А
Ð
EA
router.get('/test/subs/:current_page/:name_filter', ...
) принимать запросы, в которых нет :name_filter
? Другими словами, как в роуте сделать :name_filter
опциональным?VK
VK
ЕМ
W
EA
EA
D
W
EA
имя_технологии_ru
.W
имя_технологии_ru
.EA
const res = await apiFetch(/api/subscriptions/test/subs/${pageNumber}/${nameFilter}, {...}).