Skip to content

A humble implementation of chat using NOTIFY and LISTEN functions of Postgres

Notifications You must be signed in to change notification settings

guibeira/postgres-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postgres-chat

A humble implementation of stateless chat using NOTIFY and LISTEN functions of Postgres

This is a command-line chat application built using Rust and Postgres builtin function. It allows users to send and receive messages in a chat room.

chat sample

Development

To install this application, you will need Rust and Cargo installed on your machine. Then, update the DATABASE_URL in the .env file and run the following command:

 git clone https://github.com/guibeira/postgres-chat.git
 cd postgres-chat
 cargo run

Usage

To start the chat, run the following command:

pg-chat --channel-name <channel_name> --username <username>

Replace <channel_name> and with your desired channel name and username.

Once the chat has started, you can send messages by typing them into the command prompt and pressing enter. You will receive messages from other users in real-time.

To exit the chat, press Ctrl-C.

License This project is licensed under the MIT License. See the LICENSE file for details

About

A humble implementation of chat using NOTIFY and LISTEN functions of Postgres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages