Skip to content

Commit c4df343

Browse files
committed
run directly with 'python PostmonServer.py' using __name__ == "__main__"
1 parent 324c983 commit c4df343

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

PostmonServer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,12 @@ def track_pack(provider, track):
116116
else:
117117
response.status = '404 O Servico %s nao pode ser encontrado' % provider
118118

119-
120119
bottle.mount('/v1', app_v1)
121120

122121

123122
def _standalone(port=9876):
124-
run(host='localhost', port=port)
123+
run(host='0.0.0.0', port=port)
124+
125+
126+
if __name__ == "__main__":
127+
_standalone()

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ na raiz do projeto.
3232
Rodando a aplicação localmente na porta 9876
3333
--------------------------------
3434

35+
$ python PostmonServer.py
36+
37+
ou
38+
3539
$ ipython -i PostmonServer.py
3640
>> _standalone()
3741

0 commit comments

Comments
 (0)