DEV Community

Discussion on: Django to Phoenix - Part 4: Sessions

Collapse
 
bhaugen profile image
Bob Haugen

Heya Michael, thanks for the fascinating series of articles. We're in a slightly different place. We got some Django code, and also an already-implemented-and-deployed Phoenix app running on Cowboy. Did you ever consider trying to run Django on Cowboy instead of Phoenix on Nginx? Or is that just crazy talk?

Collapse
 
michaeljones profile image
Michael Jones

Hey, thanks for the question. Honestly, I don't know enough about Cowboy and web servers in general to know if that is crazy.

When I started on this path I tried to figure out if I could have the Phoenix app in front of the Django app and any routes that the Phoenix app didn't match would 'fall-through' to the Django one. Then I could just implement Phoenix routes as I saw fit and not have to worry about the Nginx layer to switch between them. I asked on the Elixir subreddit and the responders didn't seem to suggest that as a way forward so I've ended up with Nginx at the moment. Maybe I can figure it out and switch at some point.

I currently run the Django app via Gunicorn. I'm not really sure what it would mean to run Django on Cowboy.

Sorry I'm not in a better position to advise. I ended up taking a break from the project but have recently picked it up so I'll be building a bit more experience with path I've taken as I go.

Collapse
 
bhaugen profile image
Bob Haugen

Thanks for the response. From some other web-searching, looks like Nginx is a common connector for both Phoenix and Django, but did not find anybody trying to run Django from Cowboy.