mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
CJS -> ESM
This commit is contained in:
3
config/dotenv.js
Normal file
3
config/dotenv.js
Normal file
@@ -0,0 +1,3 @@
|
||||
// https://github.com/motdotla/dotenv/issues/133#issuecomment-255298822
|
||||
import DotenvFlow from "dotenv-flow";
|
||||
export default DotenvFlow.config();
|
||||
@@ -1,4 +1,5 @@
|
||||
const logger = require("../utils/logger")(module);
|
||||
import curriedLogger from "../utils/logger.js";
|
||||
const logger = curriedLogger(import.meta);
|
||||
|
||||
const connConfigs = {
|
||||
development: {
|
||||
@@ -8,7 +9,7 @@ const connConfigs = {
|
||||
host: process.env.DB_HOST || "127.0.0.1",
|
||||
port: process.env.DB_PORT || 5432,
|
||||
},
|
||||
staging: {
|
||||
test: {
|
||||
use_env_variable: "DB_URL", // use connection string for non-dev env
|
||||
},
|
||||
production: {
|
||||
@@ -25,4 +26,4 @@ for (const conf in connConfigs) {
|
||||
connConfigs[conf]["dialect"] = process.env.DB_DIALECT || "postgres";
|
||||
}
|
||||
|
||||
module.exports = connConfigs;
|
||||
export default connConfigs;
|
||||
|
||||
Reference in New Issue
Block a user