From afbb11914b1106158676e8e974b89a8dd70a330d Mon Sep 17 00:00:00 2001 From: Jean D'Amore Date: Tue, 28 Apr 2015 23:27:47 +1000 Subject: [PATCH] Updated README. --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e429d37..5160c04 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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.