Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus
on writing your app without needing to reinvent the wheel. It’s free and open source.
This article assumes that you have already Django installed alreay. If you don't, you can install Django from here.
To start Django project, Django have a command for run development server.
Now problem is that, after close the terminal server has also stopped. And you can't access your project anymore.
Now what we have to do to run Django server for permanent?
There are so many methods to run any server for permanent but we will discuss the easiest method to run server.
We are talking about Screen.
This is the simple method to run server forever.
First install screen on your system.
Here the guidelines to install screen on linux and Centos
After install screen run below commands and your server will start and after closed the terminal your server will not stop.
After these two commands your django server will start.
Now its time to close your terminal. So press CTRL+a and CTRL+d and close your terminal.
your server will not stop.
Source: Django Docs
This article assumes that you have already Django installed alreay. If you don't, you can install Django from here.
To start Django project, Django have a command for run development server.
python manage.py runserver
Now problem is that, after close the terminal server has also stopped. And you can't access your project anymore.
Now what we have to do to run Django server for permanent?
There are so many methods to run any server for permanent but we will discuss the easiest method to run server.
We are talking about Screen.
This is the simple method to run server forever.
First install screen on your system.
Here the guidelines to install screen on linux and Centos
After install screen run below commands and your server will start and after closed the terminal your server will not stop.
screen
python manage.py runserver
After these two commands your django server will start.
Now its time to close your terminal. So press CTRL+a and CTRL+d and close your terminal.
your server will not stop.
Source: Django Docs
Comments
Post a Comment