Update database config
This commit is contained in:
19
back/config/env/production/database.js
vendored
Normal file
19
back/config/env/production/database.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
const parse = require("pg-connection-string").parse;
|
||||
const config = parse(process.env.DATABASE_URL);
|
||||
|
||||
module.exports = ({ env }) => ({
|
||||
connection: {
|
||||
client: "postgres",
|
||||
connection: {
|
||||
host: config.host,
|
||||
port: config.port,
|
||||
database: config.database,
|
||||
user: config.user,
|
||||
password: config.password,
|
||||
ssl: {
|
||||
rejectUnauthorized: false,
|
||||
},
|
||||
},
|
||||
debug: false,
|
||||
},
|
||||
});
|
||||
3
back/config/env/production/server.js
vendored
Normal file
3
back/config/env/production/server.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = ({ env }) => ({
|
||||
url: env("MY_HEROKU_URL"),
|
||||
});
|
||||
Reference in New Issue
Block a user