Install PostgreSQL
Check PostgreSQL is running
Use psql to connect to the database
\conninfo into the interpreter.
List databases
Create a database
List databases
List tables
Setup PostgreSQL server
Open the file/etc/postgresql/<version>/main/postgresql.conf and add the following lines:
Connection Settings
Add the following lines in/etc/postgresql/<version>/main/pg_hba.conf:
Restart the PostgreSQL server:
localhost:5432 if your backend server is running on the same machine. If you are running the backend server on a different machine, you will need to configure the host and port settings in the .env file.
Summary
In this tutorial, we have learned how to set up PostgreSQL on Ubuntu on a VPS. We have also learned how to create a database, list tables and configure connection settings.Next: Advanced Node.js Logging
Continue your journey by learning how to master Winston and Morgan for production logging.

