Skip to content

Commit

Permalink
concluindo
Browse files Browse the repository at this point in the history
  • Loading branch information
May199 committed Mar 26, 2021
1 parent cff9fb5 commit 83bdf9e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Users\\Manu Neves\\AppData\\Local\\Programs\\Python\\Python37\\python.exe"
}
Binary file removed Construindo um Servidor Web Multithread.pdf
Binary file not shown.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# python-server
<h1 align="center"> :construction: Python Server :snake: Em construção... :construction: </h1>

### Concluídos

- [x] Criar um server Python
- [x] Fazer o server retornar uma página Web
- [x] Criar requisições GET
- [] Criar requisições POST
- [] Criar conexões entre cliente/servidor

### Como rodar o projeto

$ cmd.exe
$ cd C:\Users\nomeUsuário\diretorio_do_projeto\python-server
$ py main.py

### Tecnologias
- [Python](https://www.python.org/)
- [Bootstrap](https://getbootstrap.com/)
Binary file added __pycache__/webserver.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ h2{font-size: 25px;}
}
#menu{
position: relative;
left: -70px;
left: -8px;
font-style: initial;
}
5 changes: 1 addition & 4 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<!-- Required meta tags -->
Expand All @@ -20,9 +20,6 @@
<ul class="navbar-nav">

<li class="nav-item"><a class="nav-link text-dark" href="/">Home</a></li>
<li class="nav-item"><a class="nav-link text-dark" href="#cursos">Cursos</a></li>
<li class="nav-item"><a class="nav-link text-dark" href="#matriculas">Matrículas</a></li>
<li class="nav-item"><a class="nav-link text-dark" href="#eventos">Eventos</a></li>
<li class="nav-item"><a class="nav-link text-dark" href="#telefone">Telefones</a></li>
<li class="nav-item"><a class="nav-link text-dark" href="#contato">Contato</a></li>

Expand Down
4 changes: 2 additions & 2 deletions webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def start(self):
while True:
print('Aguardando conexão...')
# Definindo o sr para aguardar conexão, ele vai continuar ligado
conn, addr = sr.accept() #Objeto/Cliente
conn, addr = sr.accept()
req = HttpRequest(conn, addr)
req.start()

Expand Down Expand Up @@ -67,7 +67,7 @@ def __init__(self, conn, addr, file):
self.addr = addr
self.file = file

def processRespose(self):
def processRespose(self):
self.conn.sendall(App)


Expand Down

0 comments on commit 83bdf9e

Please sign in to comment.