move server hosting to dns

This commit is contained in:
Face
2025-09-08 18:55:02 +03:00
parent b1ae6fe95f
commit 7bf210357f
4 changed files with 20 additions and 41 deletions

View File

@@ -93,7 +93,7 @@ local function performSearch(query)
showLoading()
local url = '/api/search?q=' .. urlEncode(query) .. '&per_page=20'
local url = 'https://135.125.163.131:4880/api/search?q=' .. urlEncode(query) .. '&per_page=20'
local response = fetch(url, {
method = 'GET'
})
@@ -120,7 +120,7 @@ local function performLuckySearch()
local luckyTerms = {'test', 'demo', 'api', 'web', 'site', 'page', 'home', 'index'}
local randomTerm = luckyTerms[math.random(#luckyTerms)]
local url = '/api/search?q=' .. urlEncode(randomTerm) .. '&per_page=50'
local url = 'https://135.125.163.131:4880/api/search?q=' .. urlEncode(randomTerm) .. '&per_page=50'
local response = fetch(url, {
method = 'GET'
})

View File

@@ -69,16 +69,6 @@ impl SearchServer {
}
}
})
.get("/", {
move |_ctx| async {
Ok(GurtResponse::ok().with_string_body(include_str!("../frontend/search.html")))
}
})
.get("/search.lua", {
move |_ctx| async {
Ok(GurtResponse::ok().with_string_body(include_str!("../frontend/search.lua")))
}
})
.get("/health", |_ctx| async {
Ok(GurtResponse::ok().with_json_body(&json!({"status": "healthy"}))?)
})