Iterating Server functions
Is there a clean way to iterate server functions during runtime or startup?
7 Replies
foreign-sapphireOP•7mo ago
i want a registry, trying to decide if I should just wrap the create call, or if i can get it internally
adverse-sapphire•7mo ago
what exactly do you try to do here?
foreign-sapphireOP•7mo ago
Trying to see if i can use that to generate a swagger doc.
can make an endpoint, and make a proxy point
adverse-sapphire•7mo ago
what would you use the swagger doc for?
a server function is not an API route
you would not call it from the outside
we have a list of server functions internally, this could theoretically be exposed,
if the need arises
foreign-sapphireOP•7mo ago
that would be what the proxy point handles
just an api endpoint that calls the appropriate server function
seems like the cleanest way to accomplish my goals for the time being
cleaner than tryign to spin up elysiajs or hono or something in the same instance
adverse-sapphire•7mo ago
hmm why not use an API route instead?
foreign-sapphireOP•7mo ago
1) api routes dont have validation i could grok to make definitions. 2) Tanner said that eventually he'd have server functions do this work.
tho i guess thinking about that. i cant query the details of validation on a serverfn, since it just exposes a validation function, not the actual validator.. i might need to make a registry anyhow., if i cant attach additional data
could wrap api routes to get input/output definitions as well.. but