A simple chat app I've created with user authentication to only allow certain people to join. I created it because Discord, the regular chat is blocked on school wifi and I couldn't find a decent chat that was unblocked, so I created my own ๐
I created my chat off this template, one of the only ones I could find that wasn't outdated.
All config options are read from the environment using python's inbuilt method os.getenv
. The current supported settings are;
Setting | Description | Default value |
---|---|---|
DATABASE_URL | The postgres formatted URL of the database to connect to |
Required - no default |
HOST | The host on which to run the server | localhost |
PORT | The port on which to run the server | 80 |
PRINT_MESSAGES | Specefies if the messages sent in chat should be logged in the console | True |
MAX_CACHE_MESSAGE_LENGTH | The maximum number of messages for the server to hold in the cache before deleting the oldest one | 0 (infinite) |
LOG_PINGS | Specefies if keepalive pings from the client should be logged | False |
DEVELOPMENT | Specefies if the server is being used in a testing environment. This enables extra debug-only settings | False |
COMMAND_PREFIX | The prefix of the commands used in chat | ! |
NICKNAME_COOLDOWN | The number of seconds a user must wait between each change before being able to change it again | 0 (No cooldown) |