update some blueprints

manzilcheck
Kushal Dotel 6 months ago
parent 039e341f33
commit c223d45518
  1. 7
      backend/app.py
  2. 7
      backend/blueprints/profile/__init__.py
  3. 8
      backend/config.py
  4. BIN
      backend/requirements.txt

@ -1,13 +1,18 @@
from sys import prefix
from flask import Flask
from db.model import db
from config import *
from blueprints.profile import profile as profileBlueprint
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = DB_URI
db.init_app(app)
app.register_blueprint(profileBlueprint,url_prefix='/api')
@app.route('/', methods=['GET', 'POST'])
def homepage():
return {'message': 'Cocks were sucked !'}, 200
return {'message': 'Welcome back !'}, 200
if __name__ == '__main__':
with app.app_context():

@ -0,0 +1,7 @@
from flask import Blueprint
profile = Blueprint('profile', __name__)
@profile.route('/profile')
def get_profile():
return "Profile Page"

@ -1,9 +1,13 @@
from json import load
import os
from dotenv import load_dotenv
load_dotenv()
DB_ENGINE: str = "postgresql"
DB_USER: str = "postgres"
DB_PASSWORD: str = "1234"
DB_HOST: str = "localhost"
DB_PASSWORD: str = os.getenv('DB_PASSWORD','12345')
DB_HOST: str = "127.0.0.1"
DB_PORT: int = 5432
DB_NAME: str = "educonnect"

Binary file not shown.
Loading…
Cancel
Save