shell - How can I curl 127.0.0.1/8000 while django development server is running? -
i have never ran before because can run dev server, open new tab in terminal , curl there. can't because running django development server docker container , if open new tab, in local shell , not docker container.
how can leave development server running , still able curl or run other commands?
when run development server i'm left message:
django version 1.10.3, using settings 'test.settings' starting development server @ http://127.0.0.1:8000/ quit server control-c.
and unable type commands.
you can use &
run server background job in current shell:
$ python manage.py runserver & [1] <pid> $
you can use fg
command direct control on runserver
process, can stop usual using ctrl+c
.
to set foreground process background job, can pause using ctrl+z
, , run bg
command. can see list of running backgrounds job in current shell using jobs
command.
the difference screen
run server in current shell. if exit shell, server stop well, while screen
uses separate process continue after exit current shell.
Comments
Post a Comment