I am creating an Express.js API on a Node.js server. The API is used to access data stored on the server. I also keep the API access log in the database.
I am trying to create an admin section that Angular.js will use to display admin access logs neatly. I used the Angular Express Bootstrap semester to start my project:
https://github.com/jimakker/angular-express-bootstrap-seed/
My problem is that I need controllers.js to access node modules, but it doesn't seem to know that node exists. Here is my mistake:
controller.js var mongo = require('mongodb'); [Uncaught ReferenceError: require is not defined]
How can I use node modules in Angular.js files?
source share