Skip to content

Commit

Permalink
Updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandamore committed Apr 28, 2015
1 parent 549256d commit afbb119
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Sample nubsub application for microservices tech talk
Simple example of using event-based collaboration between two web services: the cuwtomer and email services.
The services are built using [Node Express](http://expressjs.com), and use [PubNub](www.pubnub.com), a JavaScript event stream based on WebSockets.

#To run the customer service (port 3000):
#To run the customer service:
```
git clone https://github.com/jdamore/jspubsub
cd customer-service
Expand All @@ -13,23 +13,27 @@ The services are built using [Node Express](http://expressjs.com), and use [PubN
http://localhost:3000
```

#customer service API
#Customer service API
```
- Add a customer: POST http://localhost:3000/ {name:{customer_name}, email:{customer_email}}
- Select all customers: GET http://localhost:3000/
- Select one customer: GET http://localhost:3000/{customer_name}
```

#To run the email service (port 3001):
#To run the email service:
```
git clone https://github.com/jdamore/jspubsub
cd email-service
sudo npm install
node service
http://localhost:3001
```
```

#email service API
#Email service API
```
- Select all emails: GET http://localhost:3001/
- Select one email: GET http://localhost:3001/{email}
```

#Test the integration
Run the add_customer.sh script. It will POST a new customer to the customer service, and check an welcome email has automatically been sent, because the customer_created event has been published.
Expand Down

0 comments on commit afbb119

Please sign in to comment.