Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edumats/cs50-flack
CS50W's Project2: A basic single page app chat using Flask-SocketIO.
https://github.com/edumats/cs50-flack
Last synced: 5 days ago
JSON representation
CS50W's Project2: A basic single page app chat using Flask-SocketIO.
- Host: GitHub
- URL: https://github.com/edumats/cs50-flack
- Owner: edumats
- Created: 2019-11-26T15:30:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T23:07:31.000Z (almost 2 years ago)
- Last Synced: 2024-11-10T03:30:09.958Z (2 months ago)
- Language: JavaScript
- Homepage: https://cs50w-flask-chat.herokuapp.com/
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project 2
## Web Programming with Python and JavaScript
This is a basic chat using Flask-SocketIO and a single page design.
### Installation
Run the below command to install all packages:
```
pip3 install -r requirements.txt
```### Running
Please run application.py by using `python3 application.py` instead of `flask run`. Running `flask run` will get a `ValueError: signal only works in main thread` as by [Flask-SocketIO issue](https://github.com/miguelgrinberg/Flask-SocketIO/issues/817)
### Compatibility
Please use an updated Firefox or Chrome browser for best results.
Microsoft Edge and Safari will not display the chat's messages due to incompatibility with `CSS.escape()`
### Contents
You will find all client side code in static/script.js and all server side code in application.py. A favicon and styles file were added in /static.
### Personal Touch
- Website uses a single page design, all functions are handled by Flask-SocketIO
- Added logout function at the navbar
- Alert message is displayed when submitting a channel name that already exists and auto closes after 3 seconds
- Welcome message with user name is displayed in navbar
- Channel list highlights with blue color the current active channel
- Messages are displayed in chat when user enters/leaves channel and when users logs off
- When a new message is displayed at the page, the page automaticaly scrolls down