Skip to content

MaksNech/werkzeug_free_ads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Werkzeug Ads App

1: Initial Setup

Clone project in a new directory:

cd path/to/a/new/directory
git clone https://github.com/MaksNech/pylab2018_ht_10.git

Install MongoDB:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org

The MongoDB instance stores its data files in /var/lib/mongo. Creating unit-file for MongoDB service control:

sudo touch /etc/systemd/system/mongodb.service

Inside '/etc/systemd/system/mongodb.service' adding code:

[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target

2: Getting Started

Start MongoDB:

Starting mongod.Mongod is the primary daemon process for the MongoDB system:

sudo systemctl start mongodb
sudo systemctl status mongodb

Access to MongoDB shell:

sudo mongo

Stoping mongod:

sudo systemctl stop mongodb
sudo systemctl status mongodb

Start backend:

Inside project create virtual environment:

virtualenv -p python3 env

Then start virtual environment:

source env/bin/activate

Install packages using pip according to the requirements.txt file:

pip install -r requirements.txt

Inside project directory run app with terminal command:

python3 main.py

About

Werkzeug free ads web app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published