I have an application with the following structure:
-MyApp
-backend
-app
+mongoose-models
+node_modules
index.js
package.json
-admin
+(lots of stuff)
-frontend
-app
+app_controllers
+node_modules
+public
+view
index.js
package.json
The "backend" folder is the node application for the "admin".
The "admin" is the public folder for the administration of the application, and "frontend" is the website the visitors will see.
What i'm trying to do is to access the mongoose schemas/models that are inside the "backend" folder from the controllers on "frontend/app/controller".
I tried something like this but it didn't solve my problem.
Any help will be appreciated.