2021-02-27 20:20:58 -05:00
|
|
|
from flask import Flask
|
2021-02-28 12:01:11 -05:00
|
|
|
from api.api import api_channels
|
2021-02-28 20:37:04 -05:00
|
|
|
from flask_limiter import Limiter
|
|
|
|
from flask_limiter.util import get_remote_address
|
2021-02-27 20:20:58 -05:00
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
2021-02-28 20:37:04 -05:00
|
|
|
limiter = Limiter(
|
|
|
|
app,
|
|
|
|
key_func=get_remote_address,
|
|
|
|
default_limits=["1200 per day", "50 per hour"]
|
|
|
|
)
|
|
|
|
|
2021-02-28 12:01:11 -05:00
|
|
|
app.register_blueprint(api_channels)
|
|
|
|
|
2021-02-27 20:20:58 -05:00
|
|
|
|
|
|
|
@app.route("/")
|
|
|
|
def main():
|
2021-02-28 20:51:29 -05:00
|
|
|
return "Awesome YouTubers voting system website."
|
2021-02-27 20:20:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2021-02-28 20:37:04 -05:00
|
|
|
app.run()
|