Switcher SearchDocs API
A remote document search engine that uses Skimming for Deno
A remote document search engine that uses Skimming for Deno
Switcher SearchDocs API uses Skimming and Oak Middleware modules to deliver a simple and efficient search engine.
- Clone the repository
- Run
deno task run:dev
or test withdeno task test
- Happy Deno hacking with SearchDocs!
Request (GET)
{{url}}/api/check
Sample response
{
"status": "ok",
"releaseTime": "today",
"sslEnabled": false,
"appSettings": {
"url": "https://raw.githubusercontent.com/petruki/skimming/master/",
"files": "README.md",
"cacheExpDuration": "5",
"cacheSize": "100"
}
}
Request (GET)
{{url}}/?query=Usage&previewLength=-1&ignoreCase=false&trimContent=true
- query: value to search
- previewLength: length of the content to be returned
- When 0: it shows only the matched word
- When -1: it shows the entire content from the first match
- ignoreCase: ignore case
- trimContent: prettify the response segment, basically
- regex: enable regular expression searching method
- skipCache: skip cache
Sample response
{
"message": "Success",
"query": "Sk",
"result": [
{
"file": "README.md",
"segment": [
"Skimming is a data fetcher for Deno. The idea is to provide a simple and efficient module to fetch content.",
"Skimming from \"https://raw.githubusercontent.com/petruki/skimming/v1.0.0/mod.ts\";",
"Skimming({ expireDuration: 10, size: 10 });"
],
"found": 3,
"cache": true
}
]
}
Request (GET)
{{url}}/?url=https://raw.githubusercontent.com/denoland/deno/main/&files=README.md
- url: Endpoint to be fetched
- files: artifacts to be fetched