如何将 PostgreSQL 与 hapi.js 连接

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.

我已经设置好服务器并准备好将 PostgreSQL 连接到应用程序。将数据库与 pg-promise 连接的最合适的方法是什么?

此外,针对这种方法编写此代码的最效率和最短方式是什么?

连接 hapi + postgreSQL 的最短方式是使用 K7 and the Sequelize connector. You can find an example of using it the project cart 那里你可以看到使用它的例子。

使用pg-promise with Hapi.js see hapi-pg-promise.