add creating peerings (inside serverside config)

this doesn't actually add the peerings just saves the parameters to disk
This commit is contained in:
lare 2022-11-25 21:43:28 +01:00
parent 2c9cac02e0
commit b58690a620
3 changed files with 74 additions and 35 deletions

10
nodes/main.py Normal file
View 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)