Home > database >  getting router error while exporting in express m
getting router error while exporting in express m

Time:12-26

i am new, getting router error while exporting in express ,how to fix this and also in mongo model

Expecting successful exporting in both router as well as mongo model

CodePudding user response:

you have to export it like, in every router

module.exports =router

and for any MongoDB model, you created, use the same-->

module.exports=User (or any that you created)
  • Related