Supports account creation, user login, sending messages, and fetching messages.
- Install Flask if needed with
pip install Flask
- Set you current flask app
export FLASK_APP=mychat.py
- Initialize the database
flask initdb
- Start the app with
flask run
- Finally, navigate to
localhost:5000
(or whatever flask is running at according to the feedback in your terminal)
Currently, only messages shown between the current user and the user "nick" show up in the chat log, for simplicity. You'll need to create an account and password first. In fact, the app is currently setup to require senders and recipients to exist as users in order to send a message. Try following these steps to get started:
- Navigate to create account and create a user "nick"
- Navigate back to create account (it redirects you) and create a user for yourself
- Navigate to the login page and log yourself in
- Send a message to "nick" via the home page
- See that the messages appear in a below the new message area.
Frontend code utilizes code and paradigms from Flaskr microblog