Skip to content

Commit 0853c05

Browse files
authored
Create raspberrypi.md
1 parent 09f0886 commit 0853c05

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

linux/raspberrypi.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Set up server in Raspberry Pi
2+
3+
## Set up Django web app locally
4+
5+
Find you IP:
6+
7+
```
8+
$ ifconfig
9+
```
10+
11+
Run:
12+
13+
```
14+
$ python manage.py runserver 192.XXX.XX.XX:8000
15+
```
16+
17+
You should be able to access your web app from any device in the local network.
18+
19+
This will keep the web app running while the SSH connection is active.
20+
21+
If you want to serve the app continously you can use `gunicorn`:
22+
23+
```
24+
$ gunicorn --bind 192.XXX.XX.XX:8000 your_project.wsgi --daemon
25+
```
26+
27+
28+
## References
29+
30+
- [[stackoverflow](https://stackoverflow.com/questions/13654688/what-is-the-correct-way-to-leave-gunicorn-running)](https://stackoverflow.com/questions/13654688/what-is-the-correct-way-to-leave-gunicorn-running)

0 commit comments

Comments
 (0)