Skip to content

Run Express.js with PostgreSQL on Clever Cloud

Notifications You must be signed in to change notification settings

CleverCloud/expressjs-postgresql-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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.