commented in db path for dev
Some checks failed
Build and Push Docker Images / build (push) Failing after 28s
Some checks failed
Build and Push Docker Images / build (push) Failing after 28s
This commit is contained in:
parent
7049dcc992
commit
79b018aeae
Binary file not shown.
@ -4,9 +4,12 @@ import os
|
|||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
# Path to your JSON file
|
# Path to your JSON file for production
|
||||||
db_file = os.path.join('scrapers', 'jobs_db.json')
|
db_file = os.path.join('scrapers', 'jobs_db.json')
|
||||||
|
|
||||||
|
# Path to db JSON file for development
|
||||||
|
#db_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'scrapers', 'jobs_db.json')
|
||||||
|
|
||||||
@app.route('/api/jobs', methods=['GET'])
|
@app.route('/api/jobs', methods=['GET'])
|
||||||
def get_jobs():
|
def get_jobs():
|
||||||
if os.path.exists(db_file):
|
if os.path.exists(db_file):
|
||||||
@ -17,4 +20,4 @@ def get_jobs():
|
|||||||
return jsonify(jobs)
|
return jsonify(jobs)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=False, host='0.0.0.0')
|
app.run(debug=True, host='0.0.0.0')
|
||||||
|
3379
client/package-lock.json
generated
Normal file
3379
client/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user