diff options
Diffstat (limited to 'vendor/github.com/jackc/pgx/examples/chat/README.md')
| -rw-r--r-- | vendor/github.com/jackc/pgx/examples/chat/README.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/jackc/pgx/examples/chat/README.md b/vendor/github.com/jackc/pgx/examples/chat/README.md new file mode 100644 index 0000000..a093525 --- /dev/null +++ b/vendor/github.com/jackc/pgx/examples/chat/README.md @@ -0,0 +1,25 @@ +# Description + +This is a sample chat program implemented using PostgreSQL's listen/notify +functionality with pgx. + +Start multiple instances of this program connected to the same database to chat +between them. + +## Connection configuration + +The database connection is configured via enviroment variables. + +* CHAT_DB_HOST - defaults to localhost +* CHAT_DB_USER - defaults to current OS user +* CHAT_DB_PASSWORD - defaults to empty string +* CHAT_DB_DATABASE - defaults to postgres + +You can either export them then run chat: + + export CHAT_DB_HOST=/private/tmp + ./chat + +Or you can prefix the chat execution with the environment variables: + + CHAT_DB_HOST=/private/tmp ./chat |
