add: documentation

This commit is contained in:
odweta
2026-09-08 01:14:33 +02:00
parent e601702fad
commit 2026304619
4 changed files with 5 additions and 4 deletions
+2
View File
@@ -7,6 +7,7 @@ const app = express();
// specifying the folder with the static content - html+css
app.use(express.static(__dirname + '/static'));
// root route, serving the czech version by default
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, '/static/cs/index.html'));
});
@@ -15,6 +16,7 @@ app.get('/en', (req, res) => {
res.sendFile(path.join(__dirname, '/static/en/index.html'));
});
// the search route serves the czech language by default
app.get('/search', (req, res) => {
handleSearch(req, res, "cz-CS");
});
+1 -1
View File
@@ -20,7 +20,7 @@ async function handleSearch(req, res, lang) {
q: query,
engines: "startpage",
format: "json",
category_general: 1,
category_general: 1, // this is needed for an accurate language choice by searx.ng
language: lang
});
console.log(`${searxngUrl}/search?${params}`);