Launching Tornado Web

I am new to using Tornado Web as a web server and I am having a hard time dealing with it. I usually use Django and Nginx and I use to start / stop / restart the server. However, with Tornado, I am having trouble getting it to "launch" without directly executing my main python file for the site, ie "python ~ / path / to / server.py".

I'm sure I'm completely wrong - is there a way to "load" my script so that when Nginx starts up, Tornado starts up?

Any help would be appreciated!

+2


a source to share


2 answers


No, there is no way for nginx to start your tornado instance.



You usually use an external framework like daemontools or a system init script to start the tornado process.

+2


a source


The best way to do it is to use supervisord as it is also written in python



+3


a source







All Articles