Skip to content

Commit 74dd7a7

Browse files
committed
deployment files
1 parent 823eccf commit 74dd7a7

File tree

7 files changed

+104
-24
lines changed

7 files changed

+104
-24
lines changed

Pipfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ss1 = true
4+
name = "pypi"
5+
6+
[packages]
7+
flask = "*"
8+
9+
[dev-packages]
10+
11+
[requires]
12+
python_version = "3.6"

Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: python server.py
2+

myapp2.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.7.1

server.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from flask import Flask, render_template,request
2+
3+
app = Flask(__name__)
4+
5+
@app.route('/')
6+
def index():
7+
return render_template('index.html')
8+
9+
@app.route('/add_todo')
10+
def add_todo():
11+
item = request.args.get("item")
12+
return item
13+
14+
@app.route('/foo/<name>')
15+
def foo(name):
16+
return render_template('index.html', to=name)
17+
18+
if __name__ == '__main__':
19+
app.run(debug=True, host='0.0.0.0')
20+
21+

static/main.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
body {
2-
background-color: lightblue;
2+
background-color: gray;
33
}
44

55
h1 {
6-
color: white;
6+
color: purple;
77
text-align: center;
88
}
99

10+
h2 {
11+
color: black;
12+
text-align: left;
13+
}
1014
p {
1115
font-family: verdana;
1216
font-size: 20px;
13-
}
17+
}
18+

templates/index.html

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,60 @@
1-
<html>
2-
<head>
3-
<link rel="stylesheet" href="/static/main.css">
4-
</head>
5-
<body>
6-
<h1 style="background-color:gray;"><div align="center">Hello from a template!</div></h1>
7-
<h2><p><div align="left">Hello from the world, my name is Victor.</div></p></h2>
8-
</body>
9-
</html>
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<!-- Bootstrap CSS -->
9+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
10+
11+
<title>VickyChat</title>
12+
</head>
13+
<body>
14+
<div class="jumbotron">
15+
<h1 class="display-4">Welcome to VickyChat!</h1>
16+
<p class="lead"><div class="p-3 mb-2 bg-info text-white"><span class="border border-info ">A simple chat forum</span></div></i></p>
17+
<hr class="my-4">
18+
<p class="text-gothic">Get started with VickyChat world's most hilarious chat forum :)</p>
19+
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
20+
21+
<form>
22+
<div class="form-row"><p></p>
23+
<div class="col-7">
24+
<label for="exampleInputEmail1" class="col-sm-2 col-form-label">Email address</label>
25+
<div class="col-sm-10">
26+
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
27+
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
28+
</div>
29+
<div class="form-row">
30+
<div class="col-7">
31+
<label for="inputPassword" class="col-sm-2 col-form-label">Password</label>
32+
<div class="col-sm-10">
33+
<input type="password" class="form-control" id="inputPassword" placeholder="Password">
34+
</div>
35+
<div class="form-group form-check">
36+
<input type="checkbox" class="form-check-input" id="exampleCheck1">
37+
<label class="form-check-label" for="exampleCheck1">Check me out</label>
38+
</div>
39+
<button type="submit" class="btn btn-primary">Submit</button>
40+
</form>
41+
</div>
42+
43+
44+
45+
46+
47+
48+
<!-- Optional JavaScript -->
49+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
50+
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
51+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
52+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
53+
</body>
54+
</html>
55+
56+
57+
58+
59+
60+

0 commit comments

Comments
 (0)