zappier-edge/src/paths.ts

9 lines
388 B
TypeScript

import path from 'path';
/**
* Absolute path of the project root, resolved from this module's location so
* the app works from any working directory (systemd, Docker, cron, `node
* dist/index.js` from elsewhere). Holds for both layouts: ts-node running
* src/ (root is one level up) and compiled dist/ (same one level up).
*/
export const PROJECT_ROOT = path.join(__dirname, '..');