Sequelize is a modern TypeScript and Node.js ORM for Postgres, MySQL, MariaDB, SQLite and SQL Server, and more. It features solid transaction support, relations, eager and lazy loading, read replication and more.

Connecting to with Sequelize

In order to connect Sequelize with, you'll need to find your PostgreSQL connection credentials from the Connect Tab of the database to which you would like to connect. You can find everything you need to know about your PostgreSQL credentials here

Follow the installation instructions found here. Make sure to install the dependencies for PostgreSQL.

Then use your connection string as in the following code sample:

const { Sequelize } = require("sequelize");
const sequelize = new Sequelize('[your-connection-string]?sslmode=require')

const main = async () => {
  try {
    await sequelize.authenticate();
    console.log("Connection has been established successfully.");
  } catch (error) {
    console.error("Unable to connect to the database:", error);



Add SSL Param

Please note the addition of the ?sslmode=require parameter to the connection string. Without this authentication will fail

Using Sequelize with

From here you're ready to begin using your database inside your node app!