Skip to content

Commit 1f5f504

Browse files
author
illya nizyev
committed
Merge pull request #528 from apinf/hotfix/hosts-status-check
Hotfix/hosts status check - closes #529
2 parents 9f5bbaa + 869c6a8 commit 1f5f504

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,18 @@ There are many ways to get involved:
3838
3. Clone [Apinf](https://github.com/apinf/api-umbrella-dashboard)
3939
4. Create [`settings.json`](#Settings.json)
4040
5. Type `meteor --settings /path/to/settings.json` in the project directory
41-
41+
4242
# Settings.json
4343

4444
Your `settings.json` file should have the following structure:
4545

4646
```
4747
{
48+
"apinf": {
49+
"host": "https://example.com/"
50+
},
4851
"api_umbrella": {
52+
"host": "https://example.com/"
4953
"api_key": "xxx",
5054
"auth_token": "xxx",
5155
"base_url": "https://example.com/api-umbrella/"

server/methods/status.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Meteor.methods({
1212
try{
1313

1414
// initial host for apinf
15-
var apinfHost = "https://apinf.com";
15+
var apinfHost = Meteor.settings.apinf.host;
1616

1717
// response object from apinf GET request
1818
var apinfResponse = Meteor.http.call("GET", apinfHost);
@@ -49,7 +49,7 @@ Meteor.methods({
4949
try{
5050

5151
// initial host for API umbrella
52-
var apiUmbrellaHost = "https://umbrella.apinf.io/";
52+
var apiUmbrellaHost = Meteor.settings.api_umbrella.host;
5353

5454
// response object from API Umbrella GET request
5555
var apiUmbrellaResponse = Meteor.http.call("GET", apiUmbrellaHost);
@@ -87,7 +87,7 @@ Meteor.methods({
8787

8888
try{
8989
// initial host for elasticsearch instance
90-
var elasticsearchInstance = "http://apinf.com:14002/";
90+
var elasticsearchInstance = Meteor.settings.elasticsearch.host;
9191

9292
// response object from elasticsearch GET request
9393
var elasticsearchResponse = Meteor.http.call("GET", elasticsearchInstance);

0 commit comments

Comments
 (0)