question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What modification is needed to host example with uwsgi server ?

See original GitHub issue

I am trying to setting this example api app on ubuntu 16.04 with nginx and uwsgi server( I already have an example uwsgi app setup on my machine, like following:

 def application(environ, start_response):
       start_response('200 OK', [('Content-Type', 'text/html')])
       return ["<h1 style='color:blue'>Hello There!</h1>"]

) As I am still reading through the code base, and still don’t have everything in mind.

Can anyone advise on what need to be done to host this example with uwsgi and nginx instead of using the default flask server ? I think this will become more needed when people like this repo and want to try it in their production environment.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
askzcommented, Nov 14, 2017

I just tested with

$ FLASK_CONFIG=production uwsgi --uwsgi-socket 0.0.0.0:5010 --manage-script-name --mount '/=app:create_app()'

and it works fine, note the single quote due to bash interpretration of ()

2reactions
khoroletscommented, Nov 14, 2017

@askz your comment about single quotes helped. Thanks!

P.S. Yep, I’ve exported all necessary envs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Set Up uWSGI and Nginx to Serve Python Apps on ...
In this guide, we will be setting up a simple WSGI application served by uWSGI. We will use the Nginx web server as...
Read more >
Quickstart for Python/WSGI applications - uWSGI
Quickstart for Python/WSGI applications¶. This quickstart will show you how to deploy simple WSGI applications and common web frameworks.
Read more >
uWSGI internal routing - Read the Docs
This configuration routes all of the requests starting with /psgi to the uwsgi server running on 127.0.0.1:3031 setting modifier1 to 5 and modifier2...
Read more >
uWSGI Subscription Server - Read the Docs
This will run an uWSGI fastrouter on port 1717 and create an empty dictionary where the hostname is the key and the uwsgi...
Read more >
uWSGI Options — uWSGI 2.0 documentation - Read the Docs
help : use the specified file as config template ... help : bind the cache udp server (used only for set/update/delete) to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found