Gunicorn, Inlets, Whitenoise
1 min read
Ok, tldr; I need to test gunicorn vs manage.py runserver in my local development. Normally gunicorn will not handle the static files serving, since it's nginx or other web server thing. But, in case of inlets, I don't want to setup a web server just to serve the static files, since the manage.py is handling this serving + inlets quite well.
MIDDLEWARE = [ # ... 'whitenoise.middleware.WhiteNoiseMiddleware', # ... ]
If you go to the documentation site, maybe you need to edit some references to the static folder, but in my case, adding the above line is enough.
Now, gunicorn (or the wsgi) is serving the static files correctly, and using inlets to expose the local port to public is now running perfectly.