Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
project-api
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
project-api
Commits
bf153ff6
Commit
bf153ff6
authored
Mar 26, 2018
by
fangzhipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据环境判断配置
parent
80b041c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
application.py
application.py
+6
-1
setting.py
setting.py
+0
-0
No files found.
application.py
View file @
bf153ff6
from
flask
import
Flask
from
weather.service
import
weather
import
socket
app
=
Flask
(
__name__
)
...
...
@@ -24,4 +25,8 @@ app.wsgi_app = PrefixMiddleware(app.wsgi_app, prefix='/api')
app
.
register_blueprint
(
weather
)
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
)
\ No newline at end of file
hostname
=
socket
.
gethostname
()
if
(
hostname
==
'VM-151-99-ubuntu'
):
app
.
run
(
port
=
9999
)
else
:
app
.
run
(
debug
=
True
)
\ No newline at end of file
setting.py
0 → 100644
View file @
bf153ff6
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment