Does anyone know a library or have an idea as to if it's possible to have functions act as endpoints?
So basically:
- The function params would be automatically "registered"/filled when someone makes a post request => no need to manually parse the params from the request body
- On the client, I'd need to make a fetch to that endpoint generated from the function - as always. But on the server, I should be able to just call the function without having to make a fetch. That way, I wouldn't have to extract the endpoint logic into a function, which would simplify things
Any thoughts? Could that be possible`?