Check config on load (#4170)
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
This commit is contained in:
@ -42,9 +42,10 @@ const index = {
|
||||
};
|
||||
|
||||
// Init ElasticSearch connection
|
||||
const client = config.elasticsearch ? new elasticsearch.Client({
|
||||
host: `${config.elasticsearch.host}:${config.elasticsearch.port}`
|
||||
}) : null;
|
||||
|
||||
const client = config.elasticsearch.map(({ host, port }) => {
|
||||
return new elasticsearch.Client({ host: `${host}:${port}` });
|
||||
}).getOrElse(null);
|
||||
|
||||
if (client) {
|
||||
// Send a HEAD request
|
||||
|
Reference in New Issue
Block a user