简体   繁体   中英

How to connect PostgreSQL with hapi.js

Does anyone managed to setup with PostgreSQL with Hapi.js framework? I have been looking for answers to this but no avail .

I have the server all setup and ready to connect with PostgreSQL to the application. What is the most appropriate approach to connect the database with pg-promise ?

Also, what is the most efficient and shorter way of writing this code for this approach?

要将pg-promise与 Hapi.js 一起使用,请参阅hapi-pg-promise

Most shorter way to connect hapi + postgreSQL is using K7 and the Sequelize connector. You can find an example of using it the project cart there you can see the example of using it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM