djbalin
djbalin5d ago

Different functions and root folders?

Is it possible to specify a root folder (e.g. where schema.ts and convex.config.ts are) as well as a different functions folder (i.e. where functions on the api object will be found). Am basically looking to achieve this folder structure:
convex/
functions/
video.ts
channel.ts
schema.ts
convex.config.ts
http.ts
... other root-level stuff
convex/
functions/
video.ts
channel.ts
schema.ts
convex.config.ts
http.ts
... other root-level stuff
but I want to specify functions: convex/functions such that our api object stays like api.video.fn. As far as I can tell from the docs you can only specify functions in convex.json
2 Replies
Convex Bot
Convex Bot5d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ballingt
ballingt5d ago
No, there's no customization of your convex folder structure. On the frontend you can do
const myApi = api.functions
const myApi = api.functions

Did you find this page helpful?