So I am using firebase functions, as my API request with some functions doing some work, Right now I have 1 'index.ts' file and all of my functions inside (14 functions) there with this signature:
export const $function1 = functions.region(#region).runWith({ memory: '512MB' }).https.onRequest
export const $function2 = functions.region(#region).https.onCall(async (data, context) => {
Now my question is about organize this 'index.ts',
Some of my https requests verify token and check for valid body request,
What is the best way to organize this 'index.ts' file?
How exactly I am exporting it from files in this folder without initialize the admin sdk every time?
I am trying to make this folder organize as I can as in the future I need to add more and more functions..
Thanks for the help!