CTF Platform API basic auth
Addded ctf platform Flask app with basic auth functions register, login, logout Added ctf platform database design (MySQL Workbench) Added forward engineered SQL file Added wsgi startup script Installed various python dependencies README.md Updated .gitignore Updated
This commit is contained in:
17
ctf_platform/api/main.py
Normal file
17
ctf_platform/api/main.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from flask import Flask, jsonify
|
||||
import os, logging, sys
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
app.config.from_pyfile('../config.cfg')
|
||||
app.secret_key = os.urandom(24)
|
||||
from . import auth, database
|
||||
database.init_app(app)
|
||||
app.register_blueprint(auth.bp)
|
||||
|
||||
@app.route("/")
|
||||
def home():
|
||||
info = { 'data' : { 'version': '1.0' }}
|
||||
return jsonify(info)
|
||||
|
||||
return app
|
||||
Reference in New Issue
Block a user