diff --git a/app.py b/app.py index d10c68e..f7e0b3d 100644 --- a/app.py +++ b/app.py @@ -7,20 +7,22 @@ load_dotenv() app= Flask(__name__) -CORS(app) -#CORS(app, resources={r"/*": {"origins": "https://contactify.codechefvit.com", "methods": ["GET", "POST"]}}) +#CORS(app) +CORS(app, resources={r"/*": {"origins": "https://www.google.com", "methods": ["GET", "POST"]}}) app.config['MAX_CONTENT_LENGTH'] = 1024*1024*1024 -@app.errorhandler(Exception) -def errorHandler(error): - response = jsonify({'error': 'Server Error', 'message': str(error)}) - response.status_code = 500 - app.logger.error('Server Error: %s', error) - app.logger.error(traceback.format_exc()) # Log the traceback - return response + app.register_blueprint(router) +# @app.errorhandler(Exception) +# def errorHandler(error): +# response = jsonify({'error': 'Server Error', 'message': str(error)}) +# response.status_code = 500 +# app.logger.error('Server Error: %s', error) +# app.logger.error(traceback.format_exc()) # Log the traceback +# return response + if __name__ == "__main__": app.run(host='0.0.0.0',port=os.getenv("PORT",5000))