You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 5.1 Combined HAPI `/catalog` and `/info` object
414
+
### 5.1 `server`
415
+
416
+
The server node has the form
417
+
418
+
```
419
+
"server": {
420
+
"id": "",
421
+
"prefix": "",
422
+
"landing": ""
423
+
}
424
+
```
425
+
426
+
The `id` is by default the name of the server configuration file, e.g.,
427
+
428
+
```
429
+
./hapiserver --file metadata/TestData.json
430
+
```
431
+
432
+
then `id=TestData` and `prefix=TestData`.
433
+
434
+
By default, this catalog would be served from
435
+
436
+
```
437
+
http://localhost:8999/TestData/hapi
438
+
```
439
+
440
+
The `TestData` can be changed to `TestData2` by using `prefix=TestData2`.
441
+
442
+
`landing` is the path of the page to serve at
443
+
444
+
```
445
+
http://localhost:8999/TestData/hapi
446
+
```
447
+
448
+
By default, the page served is [`./public/default.htm`](https://github.com/hapi-server/server-nodejs/blob/master/public/default.htm).
449
+
450
+
### 5.2 `catalog`
451
+
452
+
The `catalog` node can be either a string or an array. In the case that it is a string (5.2.3), the string is either a file containing a catalog array or a command line template that returns a catalog array. In the case that it is an array, it should contain either the combined HAPI `/catalog` and `/info` response (5.2.1) or a `/catalog` response with references to the `\info` response (5.2.1).
453
+
454
+
#### 5.2.1 Combined HAPI `/catalog` and `/info` object
412
455
413
456
If `catalog` is an array, it should have the same format as a HAPI `/catalog` response (each object in the array has an `id` property and and optional `title` property) **with the addition** of an `info` property that is the HAPI response for that `id`, e.g., `/info?id=dataset1`.
414
457
@@ -443,7 +486,7 @@ Examples of this type of catalog include
### 5.2 `/catalog` response with file or command template for `info` object
489
+
#### 5.2.2 `/catalog` response with file or command template for `info` object
447
490
448
491
449
492
The `info` value can be a path to a `info` JSON file
@@ -484,7 +527,7 @@ Alternatively, the metadata for each dataset may be produced by execution of a c
484
527
```
485
528
See also [Example4.json](https://github.com/hapi-server/server-nodejs/blob/master/metadata/Example4.json).
486
529
487
-
### 5.3 References to a command line template or file
530
+
#### 5.2.3 References to a command line template or file
488
531
489
532
The `catalog` value can be a command line program that generates a fully resolved catalog, e.g.,
490
533
@@ -496,6 +539,8 @@ The command line command should return the response of an `/info` query (with no
496
539
497
540
The path to a fully resolved catalog can also be given. See also [Example5.json](https://github.com/hapi-server/server-nodejs/blob/master/metadata/Example4.json).
498
541
542
+
### 5.3 `data`
543
+
499
544
<a name="Development"></a>
500
545
## 6. Development
501
546
@@ -507,7 +552,7 @@ Install [nodejs](https://nodejs.org/en/download/) (tested with v6) using either
0 commit comments