-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.cs
More file actions
25 lines (22 loc) · 798 Bytes
/
Config.cs
File metadata and controls
25 lines (22 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
namespace crawler
{
public static class Config
{
// ElasticSearch configuration
public static string ElasticSearchUrl { get; set; } = "http://localhost:9200";
// Add any other configuration parameters here
public static int MaxConcurrentRequests { get; set; } = 5;
public static int RequestTimeoutSeconds { get; set; } = 30;
// Initialize configuration from environment variables or config file
static Config()
{
// Read from environment variables if available
string esUrl = Environment.GetEnvironmentVariable("ELASTICSEARCH_URL");
if (!string.IsNullOrEmpty(esUrl))
{
ElasticSearchUrl = esUrl;
}
}
}
}