pgx/examples/chat
Jack Christensen efb333df6b Fix go modules
Wow. This is fun. Sure is easy to get modules wrong when upgrading a v2+
project.
2019-04-20 17:41:08 -05:00
..
README.md Fix up some of the examples 2019-04-13 14:31:16 -05:00
main.go Fix go modules 2019-04-20 17:41:08 -05:00

README.md

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 DATABASE_URL and standard PostgreSQL environment variables (PGHOST, PGUSER, etc.)

You can either export them then run chat:

export PGHOST=/private/tmp
./chat

Or you can prefix the chat execution with the environment variables:

PGHOST=/private/tmp ./chat