Updated README with web server information

This commit is contained in:
Simon 2018-07-10 22:35:54 -04:00
parent 2b83698292
commit 123f38e65d
2 changed files with 31 additions and 12 deletions

View File

@ -31,3 +31,34 @@ export PYTHONPATH=$(pwd)
cd crawl_server cd crawl_server
python3 server.py python3 server.py
``` ```
## Running the web server (development)
```bash
cd od-database
python3 app.py
```
## Running the web server with nginx (production)
* Install dependencies:
```bash
sudo apt install build-essential python-dev
sudo pip install uwsgi
```
* Adjust the path in `od-database.ini`
* Configure nginx (on Debian 9: `/etc/nginx/sites-enabled/default`):
```nginx
server {
...
include uwsgi_params;
location / {
uwsgi_pass 127.0.0.1:3031;
}
...
}
```
* Start uwsgi:
```bash
uwsgi od-database.ini
```

View File

@ -1,12 +0,0 @@
[settings]
default = scrapy_od_database.settings
# Automatically created by: scrapy startproject
#
# For more information about the [deploy] section see:
# https://scrapyd.readthedocs.io/en/latest/deploy.html
[deploy]
#url = http://localhost:6800/
project = scrapy_od_database