mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
MASSIVE commit
- moved to typescript - axios rate limitmodule is busted, removed for now, do something else for that - sequelize-typescript - dotenv, not dotenv-flow - removed playlist details route types for API ton of minor fixes and improvements
This commit is contained in:
25
config/sequelize.ts
Normal file
25
config/sequelize.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { SequelizeOptions } from "sequelize-typescript";
|
||||
|
||||
import curriedLogger from "../utils/logger.ts";
|
||||
const logger = curriedLogger(import.meta.filename);
|
||||
|
||||
type ConnConfigs = Record<string, SequelizeOptions>;
|
||||
|
||||
// env-specific config
|
||||
const connConfigs: ConnConfigs = {
|
||||
development: {},
|
||||
test: {},
|
||||
production: {
|
||||
// dialectOptions: {
|
||||
// ssl: true,
|
||||
// },
|
||||
},
|
||||
};
|
||||
|
||||
// common config
|
||||
for (const conf in connConfigs) {
|
||||
connConfigs[conf]!.logging = (msg: any) => logger.debug(msg);
|
||||
connConfigs[conf]!.dialect = "postgres";
|
||||
}
|
||||
|
||||
export default connConfigs;
|
||||
Reference in New Issue
Block a user