Coder Social home page Coder Social logo

Comments (10)

voxpelli avatar voxpelli commented on May 24, 2024 3

@zont I'll take a look at it now

from node-connect-pg-simple.

nstuyvesant avatar nstuyvesant commented on May 24, 2024 1

Added this pull request: #174. All tests ran successfully.

from node-connect-pg-simple.

vitaly-t avatar vitaly-t commented on May 24, 2024 1

Seems ok.

from node-connect-pg-simple.

voxpelli avatar voxpelli commented on May 24, 2024 1

I'll keep this open until I've tested and merged the PR 🙂

from node-connect-pg-simple.

zont avatar zont commented on May 24, 2024 1

We are really looking forward to this fix.

from node-connect-pg-simple.

voxpelli avatar voxpelli commented on May 24, 2024 1

Shipped in 6.2.0

from node-connect-pg-simple.

voxpelli avatar voxpelli commented on May 24, 2024

Thanks!

Until then, and preferably also after, one can provide a connection pool oneself: https://github.com/voxpelli/node-connect-pg-simple#advanced-options If there's nothing breaking in pg 8.x then it should just work

from node-connect-pg-simple.

nstuyvesant avatar nstuyvesant commented on May 24, 2024

I tried that but experienced problems...

import session from 'express-session';
import { native as pgNative } from 'pg';
import ConnectPgSimple from 'connect-pg-simple'; // depends on pg < 8.0.3
import config from '../../config/environment';

const pgNativePool = new pgNative.Pool({
  max: 10, // default
  connectionString: config.pg.uri
});

// Persist Express sessions in PostgreSQL
const pgSession = new ConnectPgSimple(session);
const store = new pgSession({
  pgNativePool,
  tableName: 'sessions'
});

export default {
  store // Hangs in Node 14 without errors (classic pg < 8.0.3 problem)
};

from node-connect-pg-simple.

alxndrsn avatar alxndrsn commented on May 24, 2024

@nstuyvesant looks like your PR works - many thanks!

For any yarn users looking for a temporary fix:

yarn remove connect-pg-simple
yarn add https://github.com/nstuyvesant/node-connect-pg-simple.git#adcb6c4642db88e6de47e3aea48a71b5ab3569fa

from node-connect-pg-simple.

voxpelli avatar voxpelli commented on May 24, 2024

Place where the Node 14 fix was made: brianc/node-postgres#2171

from node-connect-pg-simple.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.