Untitled

 avatar
user_5544336
plain_text
2 years ago
322 B
2
Indexable
Never
export const readRoutesFromFolder = async (folder: string) => {
    try {
        let routes: string[] = [];
        let fdr = path.join(__dirname, folder); 
        const files = await fs.readdir(fdr);
        return files;
    } catch (error: any) {
        console.log(`Error: ${error.message}`);
    }
    
}