const express = require('express'); const { getConnection, getActiveChannels } = require('../libs/mysql'); const router = express.Router(); router.get('/', async (req, res) => { const connection = await getConnection(); const channels = await getActiveChannels(connection); connection.end(); res.send(channels); }); module.exports = router;