mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
top level await, redis error handling, log format
This commit is contained in:
@@ -17,16 +17,13 @@ if (!process.env["DB_URI"])
|
||||
const config = seqConfig[process.env["NODE_ENV"]];
|
||||
const seqConn: Sequelize = new Sequelize(process.env["DB_URI"], config);
|
||||
|
||||
// Check connection
|
||||
(async () => {
|
||||
try {
|
||||
await seqConn.authenticate();
|
||||
logger.info("Sequelize auth success");
|
||||
} catch (error) {
|
||||
logger.error("Sequelize auth error", { error });
|
||||
throw error;
|
||||
}
|
||||
})();
|
||||
try {
|
||||
await seqConn.authenticate();
|
||||
logger.info("Sequelize auth success");
|
||||
} catch (error) {
|
||||
logger.error("Sequelize auth error", { error });
|
||||
throw error;
|
||||
}
|
||||
|
||||
// Load models
|
||||
seqConn.addModels([links, playlists]);
|
||||
|
||||
Reference in New Issue
Block a user