在Node.js中导出整个对象

So I have been searching for quite some time now. And I can't seem to find an answer to how to export entire objects. My goal is to make my project more "modular", you can see what am doing here, but essentially I would like to export the whole of the messages object so my messages.js file can read them, without having to export every object I require as a new variable.

评论