Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 994 Bytes

README.md

File metadata and controls

35 lines (26 loc) · 994 Bytes

EdgeTechTalk

Repositório para conteudo da Live Tech Talk Edge sobre Python

Set-Up machines (postgres and PgAdmin)

You can set up with docker or install directly on the machine.

With Docker

All the commands below are for a Windows machine. If using Mac or Linux machine adapt the commands

docker run --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 postgres 
docker exec -it pg-docker /bin/bash 
    psql -h localhost -U postgres 
        create database api_example; 
        \q 
    exit

if PgAdmin needed: 
docker run -p 80:80 -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=root" -d dpage/pgadmin4 

In Windows Server 2016 (or machine without docker)

Install Postgres: Instructions here

Executing the code

on the directory of the code (same folder as this README.md file) do:

python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt
python api.py