I am trying to serve static files from flask app. It is working fine in development environment from visual studio code.
I made .whl file from the project including static folder.
In setup.py
from setuptools import find_packages, setup
setup(
name='techportal',
#packages=['techportal'],
packages=find_packages(),
include_package_data=True,
install_requires=[
'flask',
],
)
In MANIFEST.IN
include myportal/static/*
Then I installed wheel and created wheel file
pip install wheel
python setup.py bdist_wheel
Installed it using pip
pip install ./myportal-0.1.whl
In linux production server I run app using:
waitress-serve --port=8080 'myportal:app'
But I am not able to open url using:
http://192.168.0.1:8080/static/index.html
question from:
https://stackoverflow.com/questions/65904848/flask-wheel-file-with-static-folder-not-being-served 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…