Comments (3)
Hadn't seen the "pg.js" variant actually – great that you point it out!
It has always been possible to supply a driver of ones own and it is recommended that one do as that enables all parts of the program to share the same connection pool etc. The included pg library is just a fallback for the cases where postgres isn't used for anything but the sessions.
I would propose just changing the fallback library from "pg" to "pg.js" entirely and let anyone who want a the more performant compiled library to supply it themselves (as they are hopefully already doing if they have an app that needs the performance).
Does that sound like a good solution?
from node-connect-pg-simple.
I actually think it's a great compromise to be made here. I approve.
But IF we are going to break the backwards compatibility with #6 anyways I would also throw out the dependency(change it to devdep).
from node-connect-pg-simple.
I think the benefit of being able to include the session module with as little configuration as possible outweighs the benefit of having one extra dependency, especially now when that dependency doesn't have to be compiled.
A minor bonus is that the dependency also documents what API of the pg/pg.js modules it is that the module support.
Apart from just switching from "pg" to "pg.js" I also flagged the 3.x versions of the modules as being compatible as none of the breaking changes in the major version there broke anything for this module.
from node-connect-pg-simple.
Related Issues (20)
- Error thrown when setting a session when connecting to Heroku-hosted PostgreSQL HOT 2
- @types/pg as dev dependency HOT 7
- Use ES6 import HOT 3
- Change `pg` to a peer dependency HOT 2
- db.bit.io issues HOT 8
- 'Failed to prune sessions: con.connect is not a function' when trying to connect PostgreSQL database with session store via Knex.js HOT 1
- error: date/time field value out of range: "1655239143" HOT 4
- Failed to prune sessions: relation "session" does not exist HOT 3
- Two sessions being saved to store HOT 1
- If at the first try to create the session table the database is down, the store fails forever HOT 3
- Getting error "Error: connect ECONNREFUSED ip_address:5432" intermittently when the RDS is restarted.
- Getting error "Error: connect ECONNREFUSED ip_address:5432" intermittently when the RDS is restarted. HOT 2
- Unexpected token in node_module index.js HOT 2
- Using "pruneSessionInterval=false" will unexpectedly disable "createTableIfMissing=true" HOT 3
- Property "replaceAll" does not exist on type "string". HOT 4
- pg-simples tries to access wrong column HOT 1
- createTableIfMissing is not working in version: 9.0.0 HOT 5
- TypeError: (0 , connect_pg_simple_1.default) is not a function HOT 2
- session_id is ignored and a new one is generated instead HOT 5
- Getting "Pool is missing for some Reasons", If not there is no communication between Client and server for more than 24 hours HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-connect-pg-simple.