Why Bob
See the Kanban board to see the roadmap and planned work.
Check out the Getting Started guide.
- Any OS supporting Java and Docker
- JDK 11+
- Boot 2.7+
- Any OS supporting Java and Docker
- JDK 11+
- Docker (latest preferred for optimal performance)
Configuration uses the environ library and therefore several variables can be set by specifying them as environment variable or as java system property. Possible variables are:
java system properties | environment variables | defaults |
---|---|---|
bob-db-host | BOB_DB_HOST | localhost |
bob-db-port | BOB_DB_PORT | 5432 |
bob-db-user | BOB_DB_USER | bob |
bob-db-name | BOB_DB_NAME | bob |
bob-docker-uri | BOB_DOCKER_URI | unix:///var/run/docker.sock |
bob-connect-timeout | BOB_CONNECT_TIMEOUT | 1000ms |
bob-read-timeout | BOB_READ_TIMEOUT | 30000ms |
bob-write-timeout | BOB_WRITE_TIMEOUT | 30000ms |
bob-call-timeout | BOB_CALL_TIMEOUT | 40000ms |
- Clone this repository.
- Install the Build requirements.
- Following steps need Docker:
-
Run
boot kaocha
to run tests. -
Start a PostgreSQL server instance locally on port 5432, and ensure a DB
bob
and a userbob
exists on the DB.docker run --name bob-db \ -p 5432:5432 \ -e POSTGRES_DB=bob \ -e POSTGRES_USER=bob \ -e POSTGRES_HOST_AUTH_METHOD=trust \ -d postgres
-
Optionally if Resources and Artifacts are to be used follow the instuctions in the Resources doc and Artifacts doc respectively.
-
Run
boot run
to start the server on port 7777.
-
Docker is need to be installed for this
One way to run the integration tests is to use docker. In the integration-tests
dir, run:
docker-compose up --abort-on-container-exit integration-tests
Note: This will try to create new containers that might have been created by running docker-compose up
in the source root. Hence you might need to clean up.
You can also run the tests using strest.
- Start Bob either via boot or docker as mentioned above.
- Install strest
npm i -g @strest/cli
- Run
strest bob-tests.strest.yaml
Note: We're simulating a stateful client on the tests. Which means you'll have to reset the database between each run. (Drop the db docker container and restart it)
This project is built using the Boot build tool which is unsupported on Cursive at the moment.
- Install Boot 2.7+.
- Install Leiningen 2.8+.
- Run
boot -d onetom/boot-lein-generate generate
to generate aproject.clj
. - Open up this directory in Cursive and it should work.
- Happy development!
Extensive Usage + API docs
For discussions regarding the usage and general development of Bob join the Gitter channel.
For a more Clojure specific discussion we also have a Clojurians Slack channel.
You can come with us with any questions that seem too lengthy for github issues.
Happy Building!