Skip to content

Microservices built in Node.js + Express to interact with Amazon Simple Queue Service(SQS).

Notifications You must be signed in to change notification settings

ro6ley/node_shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HitCount

NodeShop

This repository contains the code for this blogpost.

Getting Started

Prerequisites

Kindly ensure you have the following installed on your machine:

Running the Application

  1. Clone the repository
$ git clone https://github.com/ro6ley/node_shop.git
  1. Check into the cloned repository
$ cd node_shop
  1. Install the project dependencies:
$ npm install
  1. Configure AWS CLI
$ aws configure
  1. Create queue on AWS SQS dashboard and add queue URL to ./orderssvc/index.js and ./emailssvc/index.js under queueUrl variable.

  2. Start the Services

$ npm start
  1. Navigate to http://localhost:8081/order and place an order. Sample
{
	"itemName": "Phone case",
	"itemPrice": "10",
	"userEmail": "[email protected]",
	"itemsQuantity": "2"
}
  1. Check [email protected] mail inbox for order confirmation.

Contribution

Please feel free to raise issues using this template and I'll get back to you.

You can also fork the repository, make changes and submit a Pull Request using this template.