From f951df6eb36593ac685b3f0d30544c5a549ce0e2 Mon Sep 17 00:00:00 2001 From: Shubam Virdi Date: Fri, 17 Dec 2021 20:24:56 +0530 Subject: [PATCH] Corrected: Database.js Structure and key variable The default structure provided in the doc doesn't work on AWS. The provided syntax which has connection object within connection object which consists of configurations seems to work. username key is being replaced with user --- .../deployment/hosting-guides/amazon-aws.md | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md index 2f2d72538b..cfefa06b67 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md @@ -311,22 +311,16 @@ Copy/paste the following: ```js module.exports = ({ env }) => ({ - defaultConnection: 'default', - connections: { - default: { - connector: 'bookshelf', - settings: { - client: 'postgres', - host: env('DATABASE_HOST', '127.0.0.1'), - port: env.int('DATABASE_PORT', 5432), - database: env('DATABASE_NAME', 'strapi'), - username: env('DATABASE_USERNAME', ''), - password: env('DATABASE_PASSWORD', ''), - }, - options: { - ssl: false, - }, + connection: { + client: "postgres", + connection: { + host: env("DATABASE_HOST", "127.0.0.1"), + port: env.int("DATABASE_PORT", 5432), + database: env("DATABASE_NAME", "strapi"), + user: env("DATABASE_USERNAME", ""), + password: env("DATABASE_PASSWORD", ""), }, + useNullAsDefault: true, }, }); ```