add creating peerings (inside serverside config)
this doesn't actually add the peerings just saves the parameters to disk
This commit is contained in:
parent
2c9cac02e0
commit
e4dbef8368
3 changed files with 76 additions and 35 deletions
10
nodes/main.py
Normal file
10
nodes/main.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import falcon, json
|
||||
|
||||
class CompaniesResource(object):
|
||||
companies = [{"id": 1, "name": "Company One"}, {"id": 2, "name": "Company Two"}]
|
||||
def on_get(self, req, resp):
|
||||
resp.body = json.dumps(self.companies)
|
||||
|
||||
api = falcon.API()
|
||||
companies_endpoint = CompaniesResource()
|
||||
api.add_route('/companies', companies_endpoint)
|
Loading…
Add table
Add a link
Reference in a new issue