Skip to content

Commit 1d47ace

Browse files
committed
Setup base of Pastebin server.
0 parents  commit 1d47ace

File tree

5 files changed

+203
-0
lines changed

5 files changed

+203
-0
lines changed

Pipfile

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

Pipfile.lock

Lines changed: 143 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn app:app

app.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from flask import Flask, request, jsonify, send_file
2+
from flask_cors import CORS
3+
import sqlite3
4+
import os
5+
6+
app = Flask(__name__)
7+
CORS(app)
8+
app.debug = True
9+
10+
@app.route('/')
11+
def hello():
12+
return "Hello World!"
13+
14+
@app.route('/ping')
15+
def ping():
16+
return jsonify({ 'status': 'healthy', 'service': 'pastebin' })
17+
18+
if __name__ == '__main__':
19+
app.run(port=5000)

requirements.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# These requirements were autogenerated by pipenv
3+
# To regenerate from the project's Pipfile, run:
4+
#
5+
# pipenv lock --requirements
6+
#
7+
8+
-i https://pypi.org/simple
9+
10+
#
11+
# These requirements were autogenerated by pipenv
12+
# To regenerate from the project's Pipfile, run:
13+
#
14+
# pipenv lock --requirements
15+
#
16+
17+
-i https://pypi.org/simple
18+
click==7.1.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
19+
flask-cors==3.0.10
20+
flask==1.1.2
21+
gunicorn==20.0.4
22+
itsdangerous==1.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
23+
jinja2==2.11.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
24+
markupsafe==1.1.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
25+
six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
26+
werkzeug==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'

0 commit comments

Comments
 (0)