github.com/jackc/pgx/v5@v5.5.5/examples/chat/README.md (about)

     1  # Description
     2  
     3  This is a sample chat program implemented using PostgreSQL's listen/notify
     4  functionality with pgx.
     5  
     6  Start multiple instances of this program connected to the same database to chat
     7  between them.
     8  
     9  ## Connection configuration
    10  
    11  The database connection is configured via DATABASE_URL and standard PostgreSQL environment variables (PGHOST, PGUSER, etc.)
    12  
    13  You can either export them then run chat:
    14  
    15      export PGHOST=/private/tmp
    16      ./chat
    17  
    18  Or you can prefix the chat execution with the environment variables:
    19  
    20      PGHOST=/private/tmp ./chat