Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 1004 Bytes

README.md

File metadata and controls

16 lines (9 loc) · 1004 Bytes

NodeJS-PostgreSQL-Demo

This is an example Node.js application that works with PostgreSQL on Clever Cloud.

The application is a very simple list where you can add or delete values.

To install it, simply fork this repository and create an application from your GitHub repo. Then create a PostgreSQL add-on and link it to your application, either via the Clever Tools CLI or via the Clever Cloud console.

Direct port and host

Since this application can't run without connecting to a DB, ensure connections are maintained while deploying by enabling direct port and host on your PostgreSQL add-on before deploying this app:

direct host and port creation on Clever Cloud console

That's it, the application will use the POSTGRESQL_ADDON_DIRECT_URI environnement variable to connect to the PostgreSQL DB.