Shad Ansari | 1dcfdb3 | 2022-01-24 23:13:06 +0000 | [diff] [blame] | 1 | from flask import Flask, request |
2 | from flask_restful import Resource, Api | ||||
3 | |||||
4 | app = Flask(__name__) | ||||
5 | api = Api(app) | ||||
6 | |||||
7 | class Greeting (Resource): | ||||
8 | def get(self): | ||||
9 | return 'Hello World!' | ||||
10 | |||||
11 | api.add_resource(Greeting, '/') # Route_1 | ||||
12 | |||||
13 | if __name__ == '__main__': | ||||
14 | app.run('0.0.0.0','3333') |