Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
fergiemcdowall committed Sep 10, 2024
1 parent e520d9a commit d225d78
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 1,723 deletions.
129 changes: 19 additions & 110 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,28 @@
"description": "A search engine based on Node.js and LevelDB",
"main": "./src/main",
"dependencies": {
"commander": "^7.1.0",
"commander": "^12.1.0",
"figlet": "^1.7.0",
"levelout": "^1.0.0",
"mime": "^2.5.2",
"search-index": "5.1.3",
"server-destroy": "^1.0.1"
},
"devDependencies": {
"level-out": "^1.0.1",
"standard": "^17.0.0",
"stopword": "^2.0.5",
"swagger-jsdoc": "^6.2.5",
"tape": "^5.6.1"
"standard": "^17.1.0",
"stopword": "^3.1.1",
"swagger-jsdoc": "^6.2.8",
"tape": "^5.8.1"
},
"repository": {
"type": "git",
"url": "https://github.com/fergiemcdowall/norch.git"
},
"homepage": "https://github.com/fergiemcdowall/norch",
"keywords": [
"elasticsearch",
"search",
"server",
"solr",
"free text",
"big data"
"search",
"server"
],
"bin": {
"norch": "./bin/norch"
Expand All @@ -41,7 +37,7 @@
"node": ">=18"
},
"scripts": {
"build-openapi-docs": "rm -rf www_root/api && mkdir www_root/api && node build/mirrorUnpkg.js && node build/openAPIDoc.js && npm run lint",
"build-openapi-docs": "node build/mirrorUnpkg.js && node build/openAPIDoc.js && npm run lint",
"lint": "standard --fix src build test",
"test": "export SANDBOX=test/sandbox && rm -rf $SANDBOX && mkdir $SANDBOX && date && tape test/*-test.js && npm run lint",
"test-cli": "./bin/norch -p 9090 -i test/sandbox/norch-cli & sleep 5s && bats test/test.bats && kill $!",
Expand Down
2 changes: 1 addition & 1 deletion src/Norch.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class Norch {
console.info(pathname)

if (req.method === 'GET') {
const fileDirs = ['/']
const fileDirs = ['/', '/api/']

// default to index.html when only file-directory is specified
if (fileDirs.includes(pathname)) pathname += 'index.html'
Expand Down
2 changes: 1 addition & 1 deletion www_root/api.html → www_root/api/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<script>
window.onload = () => {
window.ui = SwaggerUIBundle({
url: './openapi-norch-1.0.0.json',
url: './openapi-norch-1.0.0-rc1.json',
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis
Expand Down
8 changes: 5 additions & 3 deletions www_root/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
/:/ / \::/ / |:| | \:\__\ /:/ /
\/__/ \/__/ \|__| \/__/ \/__/

(c) 2013-2021 <b>Fergus McDowall</b>, <a href="https://github.com/fergiemcdowall/norch">Contribute or ask a question</a>
(c) 2013-<span id="spanYear"></span> <b>Fergus McDowall</b>, <a href="https://github.com/fergiemcdowall/norch">Contribute or ask a question</a>

index contains <a href="/STATUS" id="DOCUMENT_COUNT">0</a> documents
created <a href="/STATUS" id="CREATED"></a>
last updated <a href="/STATUS" id="LAST_UPDATED"></a>

Try out the <a href="/api.html">API</a>!
Try out the <a href="/api/api.html">API</a>!

</pre>

Expand All @@ -36,7 +36,9 @@
document.getElementById('CREATED').innerHTML = new Date(CREATED).toString()
document.getElementById('LAST_UPDATED').innerHTML = new Date(LAST_UPDATED).toString()
})


window.onload = () => document.getElementById("spanYear").innerHTML = new Date().getFullYear();

</script>

</body>
Expand Down
Loading

0 comments on commit d225d78

Please sign in to comment.