mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 21:29:11 +00:00
Update Khoj server to run on non standard port, 42110 instead of 8000
Resolves #295
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
;; Khoj Static Configuration
|
||||
;; -------------------------
|
||||
|
||||
(defcustom khoj-server-url "http://localhost:8000"
|
||||
(defcustom khoj-server-url "http://localhost:42110"
|
||||
"Location of Khoj API server."
|
||||
:group 'khoj
|
||||
:type 'string)
|
||||
|
||||
@@ -75,7 +75,7 @@ export class KhojSearchModal extends SuggestModal<SearchResult> {
|
||||
this.rerank = true
|
||||
// Set input element to contents of active markdown file
|
||||
// truncate to first 8,000 characters to avoid hitting query size limits
|
||||
this.inputEl.value = await this.app.vault.read(file).then(file_str => file_str.slice(0, 8000));
|
||||
this.inputEl.value = await this.app.vault.read(file).then(file_str => file_str.slice(0, 42110));
|
||||
// Trigger search to get and render similar notes from khoj backend
|
||||
this.inputEl.dispatchEvent(new Event('input'));
|
||||
this.rerank = false
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface KhojSetting {
|
||||
|
||||
export const DEFAULT_SETTINGS: KhojSetting = {
|
||||
resultsCount: 6,
|
||||
khojUrl: 'http://127.0.0.1:8000',
|
||||
khojUrl: 'http://127.0.0.1:42110',
|
||||
connectedToBackend: false,
|
||||
autoConfigure: true,
|
||||
openaiApiKey: '',
|
||||
|
||||
@@ -35,12 +35,12 @@ def configure_server(args, required=False):
|
||||
if args.config is None:
|
||||
if required:
|
||||
logger.error(
|
||||
f"Exiting as Khoj is not configured.\nConfigure it via http://localhost:8000/config or by editing {state.config_file}."
|
||||
f"Exiting as Khoj is not configured.\nConfigure it via http://localhost:42110/config or by editing {state.config_file}."
|
||||
)
|
||||
sys.exit(1)
|
||||
else:
|
||||
logger.warning(
|
||||
f"Khoj is not configured.\nConfigure it via http://localhost:8000/config, plugins or by editing {state.config_file}."
|
||||
f"Khoj is not configured.\nConfigure it via http://localhost:42110/config, plugins or by editing {state.config_file}."
|
||||
)
|
||||
return
|
||||
else:
|
||||
|
||||
@@ -23,7 +23,7 @@ def cli(args=None):
|
||||
)
|
||||
parser.add_argument("--verbose", "-v", action="count", default=0, help="Show verbose conversion logs. Default: 0")
|
||||
parser.add_argument("--host", type=str, default="127.0.0.1", help="Host address of the server. Default: 127.0.0.1")
|
||||
parser.add_argument("--port", "-p", type=int, default=8000, help="Port of the server. Default: 8000")
|
||||
parser.add_argument("--port", "-p", type=int, default=42110, help="Port of the server. Default: 42110")
|
||||
parser.add_argument(
|
||||
"--socket",
|
||||
type=pathlib.Path,
|
||||
|
||||
Reference in New Issue
Block a user