Reputation:
I am new to Nodejs and javascript and not sure yet how to ask the right question. My main file has a var express = require('express'); on top of it. I am also creating a module that I will be requiring in my main file. I know that module also require the express module. Do I have to import the express module into it or the main file will take care of that?
Upvotes: 0
Views: 48
Reputation: 816374
Modules are completely self contained. Every module has to import the dependencies it needs.
Upvotes: 3