Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-help-and-docs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-web
ensembl-help-and-docs
Commits
6f4463f8
Commit
6f4463f8
authored
5 years ago
by
Andrey Azov
Browse files
Options
Downloads
Patches
Plain Diff
Add now.json
parent
8e0dee91
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
api/search.js
+4
-4
4 additions, 4 deletions
api/search.js
config.js
+1
-1
1 addition, 1 deletion
config.js
now.json
+7
-0
7 additions, 0 deletions
now.json
package.json
+1
-0
1 addition, 0 deletions
package.json
with
13 additions
and
5 deletions
api/search.js
+
4
−
4
View file @
6f4463f8
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
config.js
+
1
−
1
View file @
6f4463f8
const
path
=
require
(
'
path
'
);
module
.
exports
=
{
indexOutputPath
:
path
.
resolve
(
__dirname
,
'
api
'
),
indexOutputPath
:
path
.
resolve
(
__dirname
,
'
build/indices
'
),
indexName
:
'
index.json
'
}
This diff is collapsed.
Click to expand it.
now.json
0 → 100644
+
7
−
0
View file @
6f4463f8
{
"functions"
:
{
"api/search.js"
:
{
"includeFiles"
:
"build/indices/**"
}
}
}
This diff is collapsed.
Click to expand it.
package.json
+
1
−
0
View file @
6f4463f8
...
...
@@ -4,6 +4,7 @@
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"prebuild"
:
"rm -rf build && mkdir -p build/indices"
,
"build"
:
"node scripts/generateIndex.js"
},
"keywords"
:
[],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment