Skip to content

Commit 416d493

Browse files
author
Joe Kohlmann
committed
* Created a config file for Heroku deployment.
1 parent ba2d3c0 commit 416d493

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
flask/.idea
33

44
*.pyc
5-
flask/config.py
65
flask/static/cache/ArticleSearch/*.json

flask/config.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# coding=utf-8
2+
__author__ = 'kohlmannj'
3+
4+
import os
5+
from collections import OrderedDict
6+
7+
class Config(object):
8+
DEBUG = False
9+
# NYT Article Search API Key
10+
# Request a key at http://developer.nytimes.com
11+
SEARCH_API_KEY = os.environ.get("SEARCH_API_KEY","")
12+
CACHE_ROOT = os.path.join(
13+
os.path.dirname(os.path.realpath(__file__)),
14+
"static",
15+
"cache"
16+
)
17+
ARTICLE_SEARCH_ROOT = os.path.join(
18+
CACHE_ROOT,
19+
"ArticleSearch"
20+
)
21+
QUERY_CACHE_PATH = os.path.join(
22+
CACHE_ROOT,
23+
"queries.json"
24+
)
25+
26+
27+
class DevelopmentConfig(Config):
28+
DEBUG = True

0 commit comments

Comments
 (0)