Module.Exports com JavaScript

mycoolmodule/index.js
module.exports = "123";


routes/index.js


var mymodule = require('mycoolmodule')

var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
	console.log(mymodule);
});
 
/*will show 123 in the terminal*/
module.exports = router;

Javasper