emmett-framework / granian

A Rust HTTP server for Python applications
BSD 3-Clause "New" or "Revised" License
2.86k stars 83 forks source link

Instructions to run django application on ubuntu production server. #138

Closed xeroticikot closed 1 year ago

xeroticikot commented 1 year ago

I'm trying to use granian for production deployment of django application, but unable to do so due to lack of documentation. Care to provide some instruction for django runtime?

gi0baro commented 1 year ago

@xeroticikot there's no difference to any other ASGI/WSGI application and/or server.

Something like this should just work:

granian --interface asgi myproject.asgi:application
granian --interface wsgi myproject.wsgi:application
xeroticikot commented 1 year ago

Thanks for the execution command. But how can I bind it to an unix socket file to get the stream?

gi0baro commented 1 year ago

@xeroticikot you can't. Granian doesn't support unix socket files bindings.

FYI, you can always check all the available options in the README and with granian --help

xeroticikot commented 1 year ago

Thanks for the help. Really appreciate the performance boost. Had been using Gunicorn for so many projects, sometimes threading is an issue there. Believe it's time to switch from now on!

madhanrajan commented 10 months ago

this is not working on heroku, idk why