Commit fb848ac 2knal
committed
1 parent c6a8ab6 commit fb848ac Copy full SHA for fb848ac
File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 4
4
from random_proxies .cache import db
5
5
from random_proxies .cache import logger
6
6
7
+ import os
8
+ from os .path import join , dirname
7
9
from random import choice
8
10
from flask import Flask , request , jsonify
11
+ from markdown import markdown
9
12
10
13
app = Flask (__name__ )
11
14
12
15
@app .route ('/' )
13
16
def index ():
14
- return "It works!"
17
+ try :
18
+ with open (join (dirname (__file__ ), 'README.md' )) as f :
19
+ markdown_file = f .read ()
20
+ return markdown (markdown_file )
21
+ except Exception as e :
22
+ return "It works"
15
23
16
24
@app .route ('/fetch' , methods = ['GET' ])
17
25
def fetch ():
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ idna==2.9
8
8
itsdangerous == 1.1.0
9
9
Jinja2 == 2.11.2
10
10
lxml == 4.5.0
11
+ Markdown == 3.2.1
11
12
MarkupSafe == 1.1.1
12
13
pymongo == 3.10.1
13
14
PySocks == 1.7.1
You can’t perform that action at this time.
0 commit comments