umami/pages/api/test.js

14 lines
294 B
JavaScript
Raw Permalink Normal View History

2021-07-21 19:44:39 +00:00
import path from 'path';
import dirTree from 'directory-tree';
import { ok } from 'lib/response';
export default async (req, res) => {
return ok(res, {
dir: __dirname,
file: __filename,
cwd: process.cwd(),
path: path.resolve('.'),
files: dirTree(process.cwd()),
});
};