PostgreSQL

For PostgreSQL, two libraries are needed, pg@^7.0.0 and pg-hstore. You'll just need to define the dialect:

  1. const sequelize = new Sequelize('database', 'username', 'password', {
  2. // gimme postgres, please!
  3. dialect: 'postgres'
  4. })

To connect over a unix domain socket, specify the path to the socket directoryin the host option.

The socket path must start with /.

  1. const sequelize = new Sequelize('database', 'username', 'password', {
  2. // gimme postgres, please!
  3. dialect: 'postgres',
  4. host: '/path/to/socket_directory'
  5. })