Skip to content

Commit 42d9381

Browse files
committed
Create App
1 parent 2194c56 commit 42d9381

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.idea/
2+
.vscode/
3+
__pycache__/
4+
.tox/
5+
.coverage
6+
.coverage.*
7+
htmlcov/
8+
docs/_build/
9+
dist/
10+
*venv/

app.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from flask import Flask, render_template, request
2+
from pymongo import MongoClient
3+
4+
app = Flask(__name__)
5+
6+
client = MongoClient("localhost", 27017)
7+
8+
db = client.flask_db
9+
creditCards = db.creditCards
10+
11+
@app.route("/", methods=('GET', 'POST'))
12+
def index():
13+
return render_template('index.html')
14+
15+
@app.route("/newCard")
16+
def newCard():
17+
return "New Card"

templates/index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<script src="https://cdn.tailwindcss.com"></script>
7+
<link rel="preconnect" href="https://fonts.googleapis.com" />
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet" />
10+
<style>
11+
* {
12+
font-family: 'Inter', sans-serif;
13+
}
14+
</style>
15+
<title>Financial API</title>
16+
</head>
17+
<body class="w-screen h-screen">
18+
<div class="w-full flex justify-center items-center flex-col py-4">
19+
<h1 class="font-bold text-lg">Financial API</h1>
20+
<p class="mt-5">O Intuito dessa API é criar uma API Rest que seja capaz de depois de finalizada, criar-se um aplicativo completo para gerenciamento pessoal de finanças, seja web ou mobile</p>
21+
</div>
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)