Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serveIndex & docs on serving the index.html. #312

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,20 @@ To view the generated specifications, execute `npm run serve`. By default, this
- [Redocly](http://127.0.0.1:8080/redoc.html)
- [Swagger](http://127.0.0.1:8080/swagger.html)

To view changes to the related to the `index.html`, execute `npm run serveIndex`. By default this will start an http server on http://127.0.0.1:8080. Once you have the server started, you can view the `index.html` here:

- [index.html](http://127.0.0.1:8080/index.html)

You can can view the documentation here:

- [RapiDoc](http://127.0.0.1:8080/api/rapidoc.html)
- [Redocly](http://127.0.0.1:8080/api/redoc.html)
- [Swagger](http://127.0.0.1:8080/api/swagger.html)

Documentation for the [`http-server` can be found here.](https://www.npmjs.com/package/http-server)

If you need to run on another port, execute `npm run serveIndex -- -p 4543` replacing `4543` with a custom port.

## Additional Documentation

- [Verifiable Credential Issuer API Architecture Model](architecture.md)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"build": "openapi bundle *.yml --output ./api/bundles/ && openapi join ./api/bundles/*.yml --prefix-tags-with-filename && mv ./openapi.yaml ./api/vc-api.yaml",
"serve": "http-server ./api",
"serve": "http-server ./api --cors",
"serveIndex": "http-server . --cors",
"lint": "openapi lint *.yml --extends recommended"
},
"repository": {
Expand Down