Skip to content
Snippets Groups Projects
Commit 8e0dee91 authored by Andrey Azov's avatar Andrey Azov
Browse files

Continue debuggin

parent 2f25c5c9
No related branches found
No related tags found
No related merge requests found
const fs = require('fs'); const fs = require('fs');
const path = require('path');
const searchIndex = require('../scripts/searchIndex'); const searchIndex = require('../scripts/searchIndex');
const parseMarkdown = require('../scripts/parseMarkdown'); const parseMarkdown = require('../scripts/parseMarkdown');
// const index = JSON.parse(fs.readFileSync('./index.json', 'utf-8')); const indexPath = path.resolve(__dirname, './index.json');
const index = JSON.parse(fs.readFileSync(indexPath, 'utf-8'));
module.exports = async (req, res) => { module.exports = async (req, res) => {
const files = fs.readdirSync('.'); const files = fs.readdirSync(__dirname);
const parentDirFiles = fs.readdirSync('..'); // const parentDirFiles = fs.readdirSync('..');
res.json({ files, parentDirFiles }); res.json({ files, parentDirFiles });
return; return;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment