Monday, 3 April 2017

What's a painless way to "require" modules not in your node_modules/ folder?

I have some javascript files that export some common functions in use in my app. I want to be able to import those files simply by writing var example = require('example') rather than var example = require('../local_modules/example')

How do I accomplish this without adding it to the npm registry? They have to stay private.



via checks

No comments:

Post a Comment