File tree Expand file tree Collapse file tree 7 files changed +25
-9
lines changed
mininum_swagger_microservice Expand file tree Collapse file tree 7 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 1- pyms :
2- swagger :
3- path : " "
4- file : " swagger.yaml"
51my-ms :
6- DEBUG : true
7- TESTING : false
8- APP_NAME : " Python Microservice"
9- APPLICATION_ROOT : " "
2+ APP_NAME : " Python Microservice"
Original file line number Diff line number Diff line change 11import os
2-
2+ from flask import jsonify
33from pyms .flask .app import Microservice
44
55os .environ ["CONFIGMAP_FILE" ] = "config.yml"
66ms = Microservice (service = "my-ms" , path = __file__ )
77app = ms .create_app ()
88
9+ @app .route ("/" )
10+ def example ():
11+ return jsonify ({"main" : "hello world" })
12+
913if __name__ == '__main__' :
1014 app .run ()
Original file line number Diff line number Diff line change 1+ pyms :
2+ swagger :
3+ path : " "
4+ file : " swagger.yaml"
5+ my-ms :
6+ DEBUG : true
7+ TESTING : false
8+ APP_NAME : " Python Microservice"
9+ APPLICATION_ROOT : " "
Original file line number Diff line number Diff line change 1+ import os
2+
3+ from pyms .flask .app import Microservice
4+
5+ os .environ ["CONFIGMAP_FILE" ] = "config.yml"
6+ ms = Microservice (service = "my-ms" , path = __file__ )
7+ app = ms .create_app ()
8+
9+ if __name__ == '__main__' :
10+ app .run ()
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments