This projects contains the startup Flask files for developing a web application.
Open a terminal console and execute:
cd <your preferred projects root directory>
git clone https://github.com/irwa-labs/search-engine-web-app.git
python -V
# Make sure we use Python 3
cd search-engine-web-app
python web_app.py
The above will start a web server with the application:
* Serving Flask app 'web-app' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:8088/ (Press CTRL+C to quit)
Open Web app in your Browser:
http://127.0.0.1:8088/ or http://localhost:8088/
Having different version of libraries for different projects.
Solves the elevated privilege issue as virtualenv allows you to install with user permission.
In the project root directory execute:
pip3 install virtualenv
virtualenv --version
virtualenv 20.10.0
In the root of the project folder run:
virtualenv .
If you list the contents of the project root directory, you will see that it has created several sub-directories, including a bin folder (Scripts on Windows) that contains copies of both Python and pip. Also, a lib folder will be created by this action.
The next step is to activate your new virtualenv for the project:
source bin/activate
or for Windows...
myvenv\Scripts\activate.bat
This will load the python virtualenv for the project.
pip install Flask pandas nltk faker
Enjoy!
After creating the project and code in local computer...
- Login to GitHub and create a new repo.
- Go to the root page of your new repo and note the url from the browser.
- Execute the following locally.
cd <project root folder>
git init -b main
git add . && git commit -m "initial commit"
git remote add origin <your GitHub repo URL from the browser>
git push -u origin main