move server hosting to dns
This commit is contained in:
@@ -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'
|
||||
})
|
||||
|
||||
@@ -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"}))?)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user