Created
April 21, 2015 05:33
-
-
Save danmactough/063d531c89eb5294e9f9 to your computer and use it in GitHub Desktop.
In any koa app, find the app root directory from any location.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var appRoot = path.resolve(path.dirname(require.resolve('koa')), '..', '..', '..'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment