Error: Can't add new command when connection is in closed state
    at Connection._addCommandClosedState (/var/www/mia_projects/medlib.ru/node_modules/mysql2/lib/base/connection.js:159:17)
    at Connection.query (/var/www/mia_projects/medlib.ru/node_modules/mysql2/lib/base/connection.js:571:17)
    at /var/www/mia_projects/medlib.ru/routes/index.js:90:18
    at Layer.handle [as handle_request] (/var/www/mia_projects/medlib.ru/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/www/mia_projects/medlib.ru/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/var/www/mia_projects/medlib.ru/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/var/www/mia_projects/medlib.ru/node_modules/express/lib/router/layer.js:95:5)
    at /var/www/mia_projects/medlib.ru/node_modules/express/lib/router/index.js:284:15
    at param (/var/www/mia_projects/medlib.ru/node_modules/express/lib/router/index.js:365:14)
    at param (/var/www/mia_projects/medlib.ru/node_modules/express/lib/router/index.js:376:14)