Installing
Docker
If you would like to try Protean out and are a Docker fan : Docker Hub
Linux
There is a tried and tested .deb for Debian/Ubuntu flavours of Linux at : https://github.com/passivsystems/protean/releases/download/0.12.0/protean_0.12.0_all.deb
Mac OSX
For OSX we have a brogrammer script, trust us, it is safe :-)
This will install to ~/bin and in a very impolite way spew a couple of files out in there.
In a terminal run bash <(curl -fksSL https://raw.githubusercontent.com/passivsystems/protean/develop/install/install.sh)
Sample API - The Pet Store
Protean ships with a sample service/API - The Pet Store. The instructions below will describe how to run it and interact with it.
API Documentation Generation
In a terminal run protean doc -f /protean/home/path/petstore.cod.edn
.
The output in the terminal will tell you how to open your docs.
Simulation
In a terminal run protean-server
. This will start the sim server.
You will see some output when you run this startup command, including information on where service/API definitions live.
Protean ships with a sample 'petstore' service for you to experiment with. See sample-petstore.cod.edn
in the 'codex' directory which is listed in the output when you run the startup command.
You can use a command line interface CLI to play with Protean. In a terminal run protean
to get some help with things.
-
Run
protean services
to list all services. -
Run
protean service-usage -n petstore
to get a list of curl commands you can hit the service with.
Integration Testing
It is possible to integration test your simulations in a fairly simplistic manner. You do not need to write any code to do this.
In a terminal run protean test -f /path/to/myservice.cod.edn
.