Group Convex folders

Can I group these folders? For example, move the functions, auth and types into one folder because these are boilerplate and distract me when working on my projects.
No description
6 Replies
lee
lee•10mo ago
Absolutely. Are you seeing problems after putting them in folders?
FleetAdmiralJakob 🗕 🗗 🗙
Nope. Works great! Tried it out again and actually moving the auth.config.ts file into a /lib folder does not work. I get errors like: "No auth provider found matching the given token" Can you confirm this?
FleetAdmiralJakob 🗕 🗗 🗙
Seems like you have to create this file inside the convex folder. But idk if I like this behavior. It would be so cool to throw all the boilerplate into another folder so I don't get confused
No description
Michal Srb
Michal Srb•10mo ago
I think Lee meant that you can move the files with functions in them. The "config" files: auth.config.ts, schema.ts, http.ts, crons.ts and tsconfig.json need to be at the top of the convex/ folder. It's good feedback that you would like to tuck some of these away.
FleetAdmiralJakob 🗕 🗗 🗙
Yeah, I just differentiate between files I setup once and never change again (auth, functions, types) and files I change more often (schema, rules, etc.)
Michal Srb
Michal Srb•10mo ago
functions and types (assuming these are setup as suggested in Ents docs) you can move to whereever you like inside the convex/ folder.

Did you find this page helpful?