add: documentation
This commit is contained in:
@@ -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
|
||||||
```
|
```
|
||||||
@@ -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
@@ -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}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user