Skip to content

Commit

Permalink
update db config for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
stb13579 committed Sep 19, 2022
1 parent 0f6ad03 commit 6d20cc4
Showing 1 changed file with 18 additions and 24 deletions.
Expand Up @@ -180,23 +180,20 @@ In your code editor, you will need to edit a file called `database.js`. Replace
// path: ./config/database.js`
module.exports = ({ env }) => ({
defaultConnection: 'default',
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'postgres',
connection: {
client: 'postgres',
connection: {
host: env('DATABASE_HOST', '127.0.0.1'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'strapi'),
username: env('DATABASE_USERNAME', ''),
user: env('DATABASE_USERNAME', ''),
password: env('DATABASE_PASSWORD', ''),
ssl: {
rejectUnauthorized:env.bool('DATABASE_SSL_SELF', false),
},
},
options: {
ssl: false,
},
},
},
debug: false,
},
});
```
Expand All @@ -206,23 +203,20 @@ module.exports = ({ env }) => ({
```js
export default ({ env }) => ({
defaultConnection: 'default',
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'postgres',
connection: {
client: 'postgres',
connection: {
host: env('DATABASE_HOST', '127.0.0.1'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'strapi'),
username: env('DATABASE_USERNAME', ''),
user: env('DATABASE_USERNAME', ''),
password: env('DATABASE_PASSWORD', ''),
ssl: {
rejectUnauthorized:env.bool('DATABASE_SSL_SELF', false),
},
},
options: {
ssl: false,
},
},
},
debug: false,
},
});
```
Expand Down

0 comments on commit 6d20cc4

Please sign in to comment.