first commit
This commit is contained in:
parent
b216a187bd
commit
f73c77f548
119 changed files with 4504 additions and 4829 deletions
32
backend/app.py
Normal file
32
backend/app.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from flask import Flask, jsonify
|
||||
from flask_cors import CORS
|
||||
|
||||
from routes.projects import projects_bp
|
||||
from routes.contact import contact_bp
|
||||
from routes.cv import cv_bp
|
||||
from routes.services import services_bp
|
||||
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
|
||||
load_dotenv()
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
|
||||
app.config["API_KEY"] = os.getenv("API_KEY")
|
||||
|
||||
@app.route('/api/')
|
||||
@app.route('/')
|
||||
def get_home():
|
||||
return jsonify({
|
||||
"return": "Welcome to API"
|
||||
})
|
||||
|
||||
app.register_blueprint(projects_bp)
|
||||
app.register_blueprint(contact_bp)
|
||||
app.register_blueprint(cv_bp)
|
||||
app.register_blueprint(services_bp)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, port=5000)
|
||||
Loading…
Add table
Add a link
Reference in a new issue