In a file called data.js, I have a big object array:
var arr = [ {prop1: value, prop2: value},...]
I\'d like to use this array into my Node.js
I know how to export functions, [...]
An array, or really any value, can be exported the same as functions, by modifying module.exports or exports:
function
module.exports
exports
var arr = [ {prop1: value, prop2: value},...]; exports.arr = arr;
var arr = require('./data').arr;