Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to deploy flask on wamp
#1
hi,

I have a python project written in flask using python3.6. Now i have a team of 4-5 people who are going to use it, how can i deploy my python flask app on wamp server.

Methods i tried:

1 st method: https://www.youtube.com/watch?v=N3XfGXi4ifE
1 .In this i have to change denied text to granted text
2. second add +ExceCGI in the line (Options +Indexes +FollowSymLinks +Multiviews +ExceCGI)
3. Add handler .py

and then restart wamp and run the localhost/filename.py and it prints the file text as it is and does not open's in my friends system.


second method:

method is listed here
https://www.storehubs.com/Blog/deploy-py...ws-server/

but i am unable to LoadModule wsgi_module modules/mod_wsgi.so , as link mentioned in the reading is of apache vc10,

i have installed mod_wsgi using python but when i run mod_wsgi-express module-config , it sends an output like :
Error:
LoadFile "c:/python36/python36.dll" LoadModule wsgi_module "c:/python36/lib/site-packages/mod_wsgi/server/mod_wsgi.cp36-win_amd64.pyd" WSGIPythonHome "c:/python36
and then i add this into httd.conf and what to do next?


is there any such guidance anyone of you can provide on that how to run flask on wampserver

or any server which is on windows 10?
Reply
#2
Using wamp make no sense for Flask or Python.
Use the build in web server for all local development,if a team use a GitHub/BitBucket Repo.
As a example in my tutorial here,so do i have a Repo.
So if other want to run my flask app, git clone repo_url
Example:
E:\div_code
λ git clone https://bitbucket.org/snippsat/weather-app.git
Cloning into 'weather-app'...
remote: Counting objects: 60, done.
remote: Total 60 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (60/60), done.
Checking connectivity... done.

E:\div_code
λ cd weather-app\

E:\div_code\weather-app (master)
λ python app.py
 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 334-187-997
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
When finish local deployment,i would advice Gunicorn and Nginx(better and easier to setup than Apache).
DigitalOcean has good tutorial about this,as you start on a blank eg Ubuntu 18.04.
How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 18.04
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Birçoğundan çoğuna Django wamp sunucusunda çalışmıyor TMSUT 1 421 Feb-20-2024, 01:44 AM
Last Post: wearsafe
  Using Python Embedded with Flask Restplus API : to deploy on IIS gaurav_umang 1 2,224 Nov-18-2021, 01:35 AM
Last Post: Larz60+
Question Deploy Flask apps on Windows... SpongeB0B 2 3,987 Aug-08-2021, 09:12 AM
Last Post: ndc85430
Exclamation Quick Help - Deploy Flask App on Google Cloud Madoo 0 1,446 Nov-07-2020, 01:43 PM
Last Post: Madoo
  Deploy flask app on Heroku Prince_Bhatia 0 4,012 Feb-20-2019, 09:05 AM
Last Post: Prince_Bhatia
  How to deploy Django application on Apache2 server deepag 0 2,005 Jan-23-2019, 05:09 AM
Last Post: deepag

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020