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 -2
View File
@@ -4,9 +4,9 @@ This app uses a local instance of Searx.ng to get Google (Startpage) results and
## Usage ## Usage
to run just run to deploy, just run
``` ```
cd app/ cd app/
make run make rebuild
``` ```
-1
View File
@@ -1 +0,0 @@
TODO: add documentation
+2
View File
@@ -7,6 +7,7 @@ const app = express();
// specifying the folder with the static content - html+css // specifying the folder with the static content - html+css
app.use(express.static(__dirname + '/static')); app.use(express.static(__dirname + '/static'));
// root route, serving the czech version by default
app.get('/', (req, res) => { app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, '/static/cs/index.html')); 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')); res.sendFile(path.join(__dirname, '/static/en/index.html'));
}); });
// the search route serves the czech language by default
app.get('/search', (req, res) => { app.get('/search', (req, res) => {
handleSearch(req, res, "cz-CS"); handleSearch(req, res, "cz-CS");
}); });
+1 -1
View File
@@ -20,7 +20,7 @@ async function handleSearch(req, res, lang) {
q: query, q: query,
engines: "startpage", engines: "startpage",
format: "json", format: "json",
category_general: 1, category_general: 1, // this is needed for an accurate language choice by searx.ng
language: lang language: lang
}); });
console.log(`${searxngUrl}/search?${params}`); console.log(`${searxngUrl}/search?${params}`);