Comments (4)
Can you try out:
* pip install --upgrade gunicorn*
gunicorn --reload -w 2 --bind 0.0.0.0:8000 hello-world:app`
This is an absolutely weird error, never got it. But assuming you have more than 2 cores, -w 2
would create 2 workers and --reload
wil reload if it fails.
If it solves the problem, do mark the issue as resolved and close it 😄
from flask_api.
Thanks for reply @pratos ,
sorry still i am facing same issue.
from flask_api.
Okay, leave gunicorn
for this bit.
You need to add a small bit to hello-world.py
:
from flask import Flask
app = Flask(__name__)
@app.route('/users/<string:username>')
def hello_world(username=None):
return("Hello {}!".format(username))
if __name__ == "__main__":
app.run(port=8000)
- Then go to the terminal, run:
python hello-world.py
This should definitely work. So Flask
has its inbuilt HTTP server that we can use, gunicorn
and uwsgi
are alternative HTTP Server.
from flask_api.
Closing the issue on account of non-response, the above resolution will work for sure. If not please reopen again.
from flask_api.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask_api.