MCPcopy Create free account
hub / github.com/dot-agent/nextpy / add_default_endpoints

Method add_default_endpoints

nextpy/app.py:239–245  ·  view source on GitHub ↗

Add the default endpoints.

(self)

Source from the content-addressed store, hash-verified

237 return self.api
238
239 def add_default_endpoints(self):
240 """Add the default endpoints."""
241 # To test the server.
242 self.api.get(str(constants.Endpoint.PING))(ping)
243
244 # To upload files.
245 self.api.post(str(constants.Endpoint.UPLOAD))(upload(self))
246
247 def add_cors(self):
248 """Add CORS middleware to the app."""

Callers 1

__init__Method · 0.95

Calls 3

uploadFunction · 0.85
getMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected