Sha256: d4656f3215c81fd055e12e95620d31278d3da3d99ad897ec7cec56994fb80687

Contents?: true

Size: 1.16 KB

Versions: 12

Compression:

Stored size: 1.16 KB

Contents

# Run Pact Broker example

Clone project

```bash
git clone https://github.com/pact-foundation/pact_broker
```

Change directory to `example`

```bash
cd pact_broker/example
```

## Run with sqlite database

Install dependencies

```bash
bundle install
```

Run Pact Broker

```bash
bundle exec rackup
```

## Run with postgres database

Uncomment `gem 'pg'` in the [Gemfile](Gemfile)

Comment out `gem 'sqlite3'` in the [Gemfile](Gemfile)

Comment out the line with `DATABASE_CREDENTIALS = {adapter: "sqlite"...` in the [config.ru](config.ru#L9).

Uncomment the line with `DATABASE_CREDENTIALS = {adapter: "postgres"...`. in the [config.ru](config.ru#L17).

Set up postgres database

```bash
psql postgres -c "CREATE DATABASE pact_broker;"
psql postgres -c "CREATE ROLE pact_broker WITH LOGIN PASSWORD 'pact_broker';"
psql postgres -c "GRANT ALL PRIVILEGES ON DATABASE pact_broker TO pact_broker;"
```

Install dependencies

```bash
bundle install
```

Run Pact Broker

```bash
bundle exec rackup
```

If you need an example data run following command

```bash
psql pact_broker < example_data.sql
```

Now Pact Broker can be access locally at [http://localhost:9292](http://localhost:9292).

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pact_broker-2.19.2 example/README.md
pact_broker-2.19.1 example/README.md
pact_broker-2.19.0 example/README.md
pact_broker-2.18.0 example/README.md
pact_broker-2.17.1 example/README.md
pact_broker-2.17.0 example/README.md
pact_broker-2.16.1 example/README.md
pact_broker-2.16.0 example/README.md
pact_broker-2.15.0 example/README.md
pact_broker-2.14.0 example/README.md
pact_broker-2.13.1 example/README.md
pact_broker-2.13.0 example/README.md