0.1.0 • Published 4 years ago
defapi-client v0.1.0
defapi-client
Client server for viewing defapi api definitions.
Prerequisites
defapi
Core library for defining your api endpoints to be viewed by defapi-client. Install defapi in your api project. See
the README for usage info.
$ npm install defapiCLI
You can use the defapi-client cli during local development to view the api definitions of your service project.
Install
$ npm install defapi-clientUsage
$ defapi-client serve
# Options
# --baseUri - The base uri of your service.
# --port - The preferred port on which to serve your api definitionsSelf Hosted Usage
- Clone the repo
- Run:
$ defapi-client init. This creates adefapi.sources.jsfile (seesample-defapi.sources.jsfor sample contents). - Edit the
defapi.sources.jsfile for each of your api sources that you want to be captured bydefapi-client. You might consider using environment variables to determine what urls will be configured for each source based on the target environment (e.g. development, staging or production). - Make other desired changes to the project (names, docker setups, other configuration).
- Host your
defapi-clientproject.
Change Logs
0.1.0-beta
$ defapi-client initcommand to create the sources file.defapi.sources.js- SpecifybaseUriof the source instead ofmanifestUrl.manifestUrlis now discarded fromdefapi.sources.js.$ defapi-client serve- Allow user to specify preferred port by passing--portoption.- Client: Link to refresh api manifest
0.1.0
4 years ago
0.1.0-alpha
4 years ago