Run:
npm install
and
npm start
and go to http://localhost:5000.
docker build -t asyncapi-playground .
docker run -d --name asyncapi-playground -p 83:5000 asyncapi-playground:latest
Then browse to http://localhost:83
There are two options to open a specific asyncapi spec:
Open the playground with the load
query parameter set to the URL the app should load on start.
Example:
http://localhost:5000/?load=http://my.doma.in/spec.yaml
Set the environment variable DEFAULT_SPEC_URL
either before running npm start
in command line or as a docker environment variable. The spec available on the given URL will be loaded when the app is opened.
Example:
# with npm in CLI
DEFAULT_SPEC_URL=http://my.doma.in/spec.yaml npm start
# with docker
docker run -d --name asyncapi-playground -p 83:5000 --env DEFAULT_SPEC_URL=http://my.doma.in/spec.yaml asyncapi-playground:latest