Add beginnings of an api
This commit is contained in:
parent
b6800b5b47
commit
869ce7a269
3 changed files with 32 additions and 17 deletions
0
server/api/__init__.py
Normal file
0
server/api/__init__.py
Normal file
11
server/api/api.py
Normal file
11
server/api/api.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from flask import Blueprint
|
||||
|
||||
api = Blueprint("api", __name__)
|
||||
|
||||
@api.route("/api/register", methods=["POST"])
|
||||
def register():
|
||||
pass
|
||||
|
||||
@api.route("/api/login", methods=["POST"])
|
||||
def login():
|
||||
pass
|
|
@ -1,7 +1,10 @@
|
|||
from flask import Flask
|
||||
import sys
|
||||
|
||||
import config
|
||||
|
||||
from api.api import api
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = config.SECRET
|
||||
|
||||
|
@ -71,5 +74,6 @@ def reset_password():
|
|||
return "EasyCTF Reset"
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.register_blueprint(api)
|
||||
app.debug = "--debug" in sys.argv
|
||||
app.run(port=8000)
|
||||
|
|
Loading…
Reference in a new issue