#!/usr/bin/env bash

set -e

lein ci

#!/usr/bin/env bash

set -e

function wait-for-server-connection() {

    local server_port="$1"
    local max_seconds_to_wait="$2"
    i=0
    while ! nc -z 127.0.0.1 $server_port; do
        sleep 1
        echo -n "."
        ((i++)) || true
        if [ $i -gt $max_seconds_to_wait ]; then
            echo
            echo "Server connection timed out"
            exit 1
        fi
    done
    exit 0
}

lein ci

lein uberjar

export PORT=19832
eval $(cat Procfile | cut -c6-) & # Run the Procfile command

wait-for-server-connection $PORT 15

Add smoke test of booting the server
Add smoke test of booting the server
