The project is built with:
- Install pip, for Ubuntu that is:
sudo apt-get update
andsudo apt-get install python-pip
- Install the Python dependencies:
sudo pip install Flask
sudo pip install feedparser
- Run
python reader.py
and open localhost:5000 in a browser
- Install the dependencies on the VPS
- Install the Apache web server:
sudo apt-get install apache2
- Install WSGI:
sudo apt-get install libapache2-mod-wsgi
- Copy the code to /var/www/flask-news-reader on the VPS
- Configure Apache by moving the reader.conf file from the project root to /etc/apache2/sites-available, and then disable the default site, enable the new site and restart the web server by running:
sudo a2dissite 000-default.conf
sudo a2ensite reader.conf
sudo service apache2 reload
- Check for errors:
sudo tail -f /var/log/apache2/error.log
Use Python virtual environments for production