- Create
./app/secret.py
, that must contain
app_secret_key="test"
DB_link = "Atlas URL"
DB_name = "test"
- Run in CMD/Terminal
pip install virtualenv
- Create virtualenv with:
- Windows ->
virtualenv venv --python=python
- Linux ->
virtualenv venv --python=python3
- Windows ->
- Activate virtualenv:
-
Windows:
cd .\venv\Scripts\
.\activate
If you see exception:
- Run as administrator PowerShell
- Run
Set-ExecutionPolicy RemoteSigned
- Type
A
- Try again
-
Linux:
source env/bin/activate
-
- Run
pip install -r requirements.txt
- Run:
- Windows ->
python app/main.py
- Linux ->
python3 app/main.py
- Windows ->
- Open
http://localhost:5000/
- Install Docker
- Run
docker build -t server . -f server.dockerfile
- Run
docker run -d -p 5000:5000 server
- Open
http://localhost:5000/
- Install Docker
- Run
docker-compose up
- Open
http://localhost:5000/