
I try to always announce noteworthy changes & developments with node-postgres on Twitter.
You can also follow me if that's your thing. smallest possible snippet of code to reproduce the problem.If you have questions unanswered by the documentation please open an issue pointing out how the documentation was unclear & I will do my best to make it better!
If you encounter a bug with the library please open an issue on the GitHub repo. The entire list can be found on our wiki. These are some handy modules we've been using over the years to complete the picture. Node-postgres is by design pretty light on abstractions.
Bulk import & export with COPY TO/COPY FROM. Named statements with query plan caching. Extensible JS ↔ PostgreSQL data-type coercion. Pure JavaScript client and native libpq bindings share the same API. And concerning the table creation and migration, I thing a tool is appropriate because it's an issue you have to deal with in your production environment and it will handle it during the application's restart. Hence, I think let the developers choose the best solution to start the postgres is great. Sequelize migrationsįor me, there are no perfect solutions, even if you create a command to launch a proper configured docker, one can argue that it didn't install docker so you still have a dependency. If you use for example the ORM Sequelize, it could be a good choice to setup everything in migration scripts. There are several tools to cope with setup and migration. This script could be launch on the setup as well. To create the tables, you could use the same script but use the new database connection uri instead. The database might already exist, you may want to check before Get postgres docker run -name my-postgres -e POSTGRES_PASSWORD= `).
It's a hassle but at the moment these previous steps are required: However pg can't connect neither SELECT to/from a database and table that don't exist yet. I want to share a Node repo, and ideally it should be ready to use after the usual yarn install & yarn start.