Answers for "create strapi app with postgree"

2

strapi app with postgree

You can  just start with default and   paste the code below  to config/database.js

module.exports = ({ env }) => ({
  defaultConnection: 'default',
  connections: {
    default: {
      connector: 'bookshelf',
      settings: {
        client: 'postgres',
        host: env('DATABASE_HOST', 'localhost'),
        port: env.int('DATABASE_PORT', 5432),
        database: env('DATABASE_NAME', 'db_name'),
        username: env('DATABASE_USERNAME', 'db_user'),
        password: env('DATABASE_PASSWORD', 'password'),
        schema: 'public',
      },
      options: {},
    },
  },
});
Posted by: Guest on June-10-2021

Browse Popular Code Answers by Language