Skip to content

Commit

Permalink
fix npm run opendoc command and html link to the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericHeem committed Aug 25, 2017
1 parent 44125a4 commit b02bfee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/README.md
Expand Up @@ -27,6 +27,7 @@ These are the main *npm* commands during a standard developer workflow:
| `npm run mocha`| Run the tests |
| `npm run mock` | Run a mock server based on the RAML api definition |
| `npm run doc` | Generate the API HTML documentation |
| `npm run opendoc` | Open the API HTML documentation |

# Mind Map

Expand Down Expand Up @@ -239,7 +240,7 @@ It will not only test the code, but also checks the source code with eslint and
The REST API implemented by this backend is designed and modeled with [RAML](http://raml.org/) which stands for Rest API Modeling Language.
From a file describing the API such as the [user's API](src/plugins/users/raml/users.raml), several dedicated tools will perform the following benefits:

* `npm run doc`: The [API documentation in HTML](http://starhack.it/api.html)
* `npm run doc`: The [API documentation in HTML](http://starhack.it/api/v1/doc/api.html)
* `npm run mocker`: A mock server that will responds to web browser according the API specification, useful for frontend developers which can start before the backend is fully implemented.
* A mock client which verifies that the backend implemented correctly the API.

Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Expand Up @@ -28,7 +28,7 @@
"mocker": "node scripts/mocker-server.js",
"api-check": "abao src/plugins/users/raml/users.raml --server http://localhost:9000/api/v1",
"doc": "node scripts/apidoc.js",
"opendoc": "open build/api.html"
"opendoc": "npm run doc && open build/api/v1/doc/api.html"
},
"dependencies": {
"axios": "0.13.1",
Expand Down

0 comments on commit b02bfee

Please sign in to comment.