mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
18 lines
338 B
Python
18 lines
338 B
Python
from celery import Celery
|
|
from flask import Flask
|
|
from flask_restful import Api
|
|
|
|
# TODO: 用配置文件启动 http://www.pythondoc.com/flask/config.html
|
|
app = Flask(__name__)
|
|
app.config['DEBUG'] = True
|
|
|
|
# init flask api instance
|
|
api = Api(app)
|
|
|
|
# reference api routes
|
|
import routes.task
|
|
import routes.spider
|
|
|
|
# start flask app
|
|
app.run()
|