Rendering Assets from Deployment Files

To simplify the rendering of assets I created a directory /storage within my deployment. I created several API endpoints to apply CRUD operations to such files. One endpoint as such (written with Flask) was as follows:

@app.route('/api/get-metadata', methods=['GET']) def get_metadata(): with open(METADATA_PATH, 'r') as f: metadata = json.load(f) return jsonify(metadata), 200

This had no problem working locally. Now that it is deployed - the request is (pending) indefinitely and eventually times out. Locally the request is fulfilled almost instantaneously as it is very light.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.