...

Text file src/github.com/jackc/pgx/v5/examples/chat/README.md

Documentation: github.com/jackc/pgx/v5/examples/chat

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

View as plain text