var fs = require('fs'),config = require('../../server/config')
I created module (local-require) which simple create symbolic link of ur local module to node_modules folder so that you can use them directly from any place from codebase.
> > Can any one tell how people manage large code base ?
>
> Break things up into small modules -- commit them in node_modules, or isolateI created module (local-require) which simple create symbolic link of ur local module to node_modules folder so that you can use them directly from any place from codebase.
Most of time node_modules folder is added in .gitignore .. and adding these local module in node_modules after making. Chages is painful.. thats way i created the module .. btw i know it is not ideal solution.. ideal scenario should not create nested directory structure.. just in search of some good blog post which will explain it with fairly complex problem .. or about how to organize code in node.js project
I recently create module. Which help in avoiding mess of relative path while including local modules.I post module link and ask suggestion on #node.js irc center many people think it is basically wrong to have nested directory structure ( i also know it is dirty).
So i was searching around in some big project in node.js . I come across ghost which is fairly large node.js project. I end up looking their directory structure which is more or less nested .. i find following codevar fs = require('fs'),config = require('../../server/config')
which requiring local module using relative path and there is no second thought is this is error prone.
My question how does other large project manage code .. because there so many small piece code which are closely related to project so can not publish on npm and creating that number or private repo is not financially feasible ( talking about github)
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.