Skip to content

Commit 5bcf69c

Browse files
committed
Updated examples
1 parent 9efa99b commit 5bcf69c

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1-
pyms:
2-
swagger:
3-
path: ""
4-
file: "swagger.yaml"
51
my-ms:
6-
DEBUG: true
7-
TESTING: false
8-
APP_NAME: "Python Microservice"
9-
APPLICATION_ROOT: ""
2+
APP_NAME: "Python Microservice"
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import os
2-
2+
from flask import jsonify
33
from pyms.flask.app import Microservice
44

55
os.environ["CONFIGMAP_FILE"] = "config.yml"
66
ms = Microservice(service="my-ms", path=__file__)
77
app = ms.create_app()
88

9+
@app.route("/")
10+
def example():
11+
return jsonify({"main": "hello world"})
12+
913
if __name__ == '__main__':
1014
app.run()

examples/mininum_swagger_microservice/__init__.py

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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: ""
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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.

0 commit comments

Comments
 (0)