This will open a CLI where you can run SQL commands.
After first launching psql, you may check the details of your connection by typing \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:
This will allow connections from any IP address. This is not recommended for production environments.
Edit connection settings in /etc/postgresql/<version>/main/pg_hba.conf
Add the following lines:
Restart the PostgreSQL server:
This server will be accessible at 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.