Hacktoberfest, is a month-long celebration of open source software run by DigitalOcean. During the month of October, we invite you to join open-source software enthusiasts, beginners, and the developer community by contributing to open-source projects. You can do this in a variety of ways:
Prepare and share your project for collaboration
Contribute to the betterment of a project via pull requests
1.Create proper file structure
a) Create folder for each base route for eg:- /admin , /user etc
b) Each folder should define every route of base route for eg:- /admin/login , /admin/dashboard , /user/signup , /user/login
c) Each route should have a function passing to it which will handle all the task for eg :-
This { route.post('/admin',auth,(req,res)=>{}) }
should change into =>{ route.post('/admin',auth, admin) };
where auth is a middleware ,and admin is the function which will is handling all the requests .