From c760302ff84927de3a3722068f1aa9a47bfd1532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E8=83=9C=E8=88=9F?= <1650473152@com> Date: Mon, 29 May 2023 00:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A1=B9=E7=9B=AE=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++++- applications/config.py | 4 ---- run.bat | 1 + run.sh | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 run.bat create mode 100755 run.sh diff --git a/README.md b/README.md index 8df5325..60f16a3 100644 --- a/README.md +++ b/README.md @@ -139,9 +139,15 @@ flask db init flask db migrate flask db upgrade flask admin init + +# windoes +run.bat + +# linux +chmod +x run.sh +./run.sh ``` -执行 python app.py 命令启动项目 #### 命令行创建视图 diff --git a/applications/config.py b/applications/config.py index 0939033..a3ffcb0 100644 --- a/applications/config.py +++ b/applications/config.py @@ -6,10 +6,6 @@ from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore class BaseConfig: - DEBUG = True - HOST = '127.0.0.1' - PORT = 5000 - SUPERADMIN = 'admin' SYSTEM_NAME = 'Pear Admin' diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..aded26a --- /dev/null +++ b/run.bat @@ -0,0 +1 @@ +flask --app app.py run -h 0.0.0.0 -p 8000 --debug \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..aded26a --- /dev/null +++ b/run.sh @@ -0,0 +1 @@ +flask --app app.py run -h 0.0.0.0 -p 8000 --debug \ No newline at end of file