Skip to content

Commit c70d1f2

Browse files
committed
Release v0.9.3
1 parent d693691 commit c70d1f2

File tree

5 files changed

+242
-2417
lines changed

5 files changed

+242
-2417
lines changed

README.md

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,28 @@ A list of datasets that are served using this sofware is given at [http://hapi-s
3737
OS-X:
3838

3939
```bash
40-
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2-darwin-x64.tgz
41-
tar zxvf hapi-server-v0.9.2-darwin-x64.tgz
40+
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2
41+
tar zxvf hapi-server-v0.9.2
42+
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2
43+
tar zxvf hapi-server-v0.9.2
4244
cd hapi-server-v0.9.2
4345
./hapi-server
4446
```
4547

4648
Linux x64:
4749

4850
```bash
49-
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2-linux-x64.tgz
50-
tar zxvf hapi-server-v0.9.2-linux-x64.tgz
51+
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2
52+
tar zxvf hapi-server-v0.9.2
5153
cd hapi-server-v0.9.2
5254
./hapi-server
5355
```
5456

5557
Linux ARMv7l:
5658

5759
```bash
58-
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2-linux-armv7l.tgz
59-
tar zxvf hapi-server-v0.9.2-linux-armv7l.tgz
60+
curl -L -O https://github.com/hapi-server/server-nodejs/releases/download/v0.9.2/hapi-server-v0.9.2
61+
tar zxvf hapi-server-v0.9.2
6062
cd hapi-server-v0.9.2
6163
./hapi-server
6264
```
@@ -284,7 +286,7 @@ All relative paths in commands in metadata files are relative to the directory w
284286
For example, if
285287

286288
```
287-
/tmp/hapi-server-v0.9.2/hapi-server -f metadata/TestData.json
289+
/tmp/hapi-server-0.9.4
288290
```
289291

290292
is executed from `/home/username`, the file
@@ -362,12 +364,13 @@ The top-level structure of the configuration file is
362364

363365
```
364366
{
365-
"catalog": [See 5.1: Combined HAPI /catalog and /info object],
366-
// or
367-
"catalog": [See 5.2: HAPI /catalog response with file or command line template for info object],
368-
// or
369-
"catalog": "See 5.3: Command line template or file",
370-
"data": {
367+
"server": { // See section 5.1
368+
"id": "",
369+
"prefix": "",
370+
"landing": ""
371+
},
372+
"catalog": array or string // See section 5.2
373+
"data": { // See section 5.3
371374
"command": "Command line template",
372375
or
373376
"file": "HAPI CSV file"
@@ -408,7 +411,47 @@ python ./bin/Example.py --dataset ${id} --parameters \
408411
${parameters} --start ${start} --stop ${stop} --format ${format}"`
409412
```
410413
411-
### 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
412455
413456
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`.
414457
@@ -443,7 +486,7 @@ Examples of this type of catalog include
443486
* [Example1.json](https://github.com/hapi-server/server-nodejs/blob/master/metadata/Example1.json)
444487
* [TestData.json](https://github.com/hapi-server/server-nodejs/blob/master/metadata/TestData.json)
445488
446-
### 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
447490
448491
449492
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
484527
```
485528
See also [Example4.json](https://github.com/hapi-server/server-nodejs/blob/master/metadata/Example4.json).
486529
487-
### 5.3 References to a command line template or file
530+
#### 5.2.3 References to a command line template or file
488531
489532
The `catalog` value can be a command line program that generates a fully resolved catalog, e.g.,
490533
@@ -496,6 +539,8 @@ The command line command should return the response of an `/info` query (with no
496539
497540
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).
498541
542+
### 5.3 `data`
543+
499544
<a name="Development"></a>
500545
## 6. Development
501546
@@ -507,7 +552,7 @@ Install [nodejs](https://nodejs.org/en/download/) (tested with v6) using either
507552
508553
```bash
509554
# Install Node Version Manager
510-
curl https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
555+
curl https://raw.githubusercontent.com/creationix/nvm/v0.9.2/install.sh | bash
511556
512557
# Open new shell (see displayed instructions from above command)
513558
@@ -532,4 +577,4 @@ node test/test.js
532577
533578
Bob Weigel <[email protected]>
534579
535-
Please submit bugs and feature requests to the [issue tracker](https://github.com/hapi-server/server-nodejs/issues)
580+
Please submit bugs and feature requests to the [issue tracker](https://github.com/hapi-server/server-nodejs/issues)

0 commit comments

Comments
 (0)