Django runserver permanent

后端 未结 8 491
-上瘾入骨i
-上瘾入骨i 2020-12-07 09:54

How can I make the development server from django running permanent? So that it does\'t stop when I quit the shell.

Thanks

8条回答
  •  死守一世寂寞
    2020-12-07 10:07

    I'm just about to do this myself. The scenario is that I'm rapid prototyping for a client and they need to see what things look like. There will never be more than 2-3 people on this at a time, but I don't want to set up Apache or stay logged in.

    sudo ./manage.py runserver 192.168.1.94:80 [run this on port 80 so a normal business user can see it]
    ctrl+z [to suspend the job (same thing as appending & to the above command but then I don't need to deal with entering the sudo password on the command line)]
    bg %1 [puts the job in the background]
    jobs [just to see what's going on]
    exit [exit the session]
    

提交回复
热议问题