Giter VIP home page Giter VIP logo

Comments (4)

pratos avatar pratos commented on July 28, 2024

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.

peddollakishore avatar peddollakishore commented on July 28, 2024

Thanks for reply @pratos ,

sorry still i am facing same issue.

screenshot from 2017-09-29 04-57-07
screenshot from 2017-09-29 04-57-22
please help me out of this..

from flask_api.

pratos avatar pratos commented on July 28, 2024

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.

pratos avatar pratos commented on July 28, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.