Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 924 Bytes

File metadata and controls

48 lines (38 loc) · 924 Bytes

Products Cloud Native Microservice

Prerequisites

Node 18

For Windows

choco install node

For MacOS

brew install node

Popuate MonoDB with data

brew tap mongodb/brew
brew install mongodb-database-tools
source .env.local
mongoimport --uri $MONGO_URI --collection='product-summaries' --file='data/product-summaries.json' --jsonArray --authenticationDatabase 'admin' --db='e-commerce'
mongoimport --uri $MONGO_URI --collection='deals' --file='data/deals.json' --jsonArray --authenticationDatabase 'admin' --db='e-commerce'

Build

npm install
npm install -g nodemon

Run Locally

npm start

Build Docker Image

Tell Docker CLI to talk to minikube's VM.

For MacOS, eval $(minikube docker-env) For Windows, & minikube -p minikube docker-env --shell powershell | Invoke-Expression

Build docker image, docker build -t products:latest .