Skip to content

mmukunga/reactflask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reactflask

install gunicorn in your virtual environment

pip install gunicorn

then update your requirements.txt file

pip freeze > requirements.txt

After checking that gunicorn is in requirements.txt run:

pip install -r requirements.txt

Create a project environment for the Flask tutorial

Windows

python -m venv env

In VS Code, open the Command Palette (View > Command Palette or (Ctrl+Shift+P)).

Then select the Python:

Select Interpreter command:

correct version of python.exe

Update pip in the virtual environment by running the following command in the VS Code Terminal:

python -m pip install --upgrade pip

Install Flask in the virtual environment by running the following command in the VS Code Terminal:

python -m pip install flask

Create and run a minimal Flask app

(env) D:\py\hello_flask>

app.py

from flask import Flask

app = Flask(name)

@app.route("/")

def home():

return "Hello, Flask!"

(env) D:\py\hello_flask>python -m flask run

cd D:\Temps\ReactFlask\frontend

rmdir 'D:\Temps\ReactFlask\frontend\build' /s /q

remove-item 'D:\Temps\ReactFlask\frontend\build*' -recurse -force npm run build cd D:\Temps\ReactFlask

git status git add . git commit -m "first commit"

git commit --allow-empty -m "Purge cache"

git branch -M main git push -u origin main

heroku logs --tail --app reactflask-smb

heroku builds:cache:purge -a reactflask-smb --confirm reactflask-smb

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors