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

Add now.json

parent 8e0dee91
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,13 @@ const path = require('path');
const searchIndex = require('../scripts/searchIndex');
const parseMarkdown = require('../scripts/parseMarkdown');
const indexPath = path.resolve(__dirname, './index.json');
const index = JSON.parse(fs.readFileSync(indexPath, 'utf-8'));
// const indexPath = path.resolve(__dirname, './index.json');
// const index = JSON.parse(fs.readFileSync(indexPath, 'utf-8'));
module.exports = async (req, res) => {
const files = fs.readdirSync(__dirname);
const files = fs.readdirSync(path.resolve(__dirname, '../build'));
// const parentDirFiles = fs.readdirSync('..');
res.json({ files, parentDirFiles });
res.json({ files });
return;
......
const path = require('path');
module.exports = {
indexOutputPath: path.resolve(__dirname, 'api'),
indexOutputPath: path.resolve(__dirname, 'build/indices'),
indexName: 'index.json'
}
{
"functions": {
"api/search.js": {
"includeFiles": "build/indices/**"
}
}
}
......@@ -4,6 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"prebuild": "rm -rf build && mkdir -p build/indices",
"build": "node scripts/generateIndex.js"
},
"keywords": [],
......
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