ro6ley / node_shop

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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": "randomuser@gmail.com",
	"itemsQuantity": "2"
}
  1. Check randomuser@gmail.com 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.

About

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


Languages

Language:JavaScript 100.0%