Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

afterCreate at pool setting is not supported #4

Closed
ghost opened this issue Oct 12, 2020 · 1 comment
Closed

afterCreate at pool setting is not supported #4

ghost opened this issue Oct 12, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 12, 2020

No description provided.

@svtslv
Copy link
Owner

svtslv commented Jun 2, 2021

@codingtogethergroup

  imports: [
    KnexModule.forRootAsync({
      useFactory: () => ({
        config: {
          client: 'pg',
          connection: 'postgres://USERNAME:PASSWORD@localhost:5432/DATABASE',
          pool: {
            afterCreate: (conn, done) => {
              conn.query('SELECT version();', (err, result) => {
                console.log('afterCreate', result);
                done();
              });
            },
          },
        },
      }),
    },)
  ],

@svtslv svtslv closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant