Fixed incorrect path for loading README as index

pull/85/head
tycrek 3 years ago
parent ad5a20e317
commit 03ecbb9520
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -70,7 +70,7 @@ const ASS_INDEX = indexFile !== '' && fs.existsSync(`./${indexFile}`) && require
const ASS_INDEX_ENABLED = typeof ASS_INDEX === typeof Function;
app.get('/', (req, res, next) => ASS_INDEX_ENABLED // skipcq: JS-0229
? ASS_INDEX(req, res, next)
: fs.readFile(path('README.md'))
: fs.readFile(path('.github', 'README.md'))
.then((bytes) => bytes.toString())
.then(marked)
.then((d) => res.render('index', { data: d }))

Loading…
Cancel
Save