forked from unit/ciclostile
23 lines
467 B
Python
23 lines
467 B
Python
|
import click
|
||
|
from flask import Flask, send_from_directory, render_template, request
|
||
|
from flask_httpauth import HTTPDigestAuth
|
||
|
|
||
|
from .api import api
|
||
|
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
app.register_blueprint(api, url_prefix="/api")
|
||
|
|
||
|
app.config['SECRET_KEY'] = 'secret key here'
|
||
|
|
||
|
|
||
|
@click.command()
|
||
|
@click.option("-p", "--port", type=int, default=12345)
|
||
|
@click.argument("post_dir", default=".")
|
||
|
def cli(port, post_dir):
|
||
|
app.run(port=port)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
cli()
|