Skip to content

davidkingg/Flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask

Description

this is a simple flask application that incorporates user login and authentication

this application has a userlist page which authenticated users can use to see all usernames on the database

this application has a rest api to get the list of users

preview

file:///home/david/Pictures/Screenshots/Screenshot%20from%202022-08-20%2009-37-18.pngimage file:///home/david/Pictures/Screenshots/Screenshot%20from%202022-08-20%2009-37-27.pngimage file:///home/david/Pictures/Screenshots/Screenshot%20from%202022-08-20%2009-37-48.pngimage file:///home/david/Pictures/Screenshots/Screenshot%20from%202022-08-20%2009-41-59.pngimage file:///home/david/Pictures/Screenshots/Screenshot%20from%202022-08-20%2010-01-51.pngimage

Setting the application

this application requires a database to run. the database required is mysql.

in the app config settings in apps.py, set the SQLALCHEMY_DATABASE_URI to match the user, password and host of the mysql serer to be used.

the name of the database should remain flask

setting up database

open create_db.py and set the host, user and passord to the setting of the mysql server to be used. the name of the database should remain flask.

Running the application

1 Change directory to the backend folder cd backend

2 Create virtualenv virtualenv -p python3 env

3 Activate virtualenv source bundle_env/bin/activate

4 Install required python modules pip install -r requirements.txt

5 Only during the initial launch create database schema for your application python create_db.py. this would create the flask database

6 Run the application python app.py

That's it! Now your application is running at port 5000 and you can access it by typing http://localhost:5000/ in your browser.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published