0.0.1 • Published 5 years ago
ratings-reviews v0.0.1
Building RESTful Web APIs with Node.js, Express, MongoDB and TypeScript
This is REST API for: "This miscro-service used to handle reviews and ratings submit by renters, owners, etc".
Requirements
Install global TypeScript and TypeScript Node
npm install -g typescript ts-node
Getting Started
.env file containes environment variables that need to be set in order to get the project up and running
Clone this repository
Clone repo
Then install the dependencies
npm install
Set the environment variables
Environment variables that need to be set in order to get the project up and running
MONGO_CONN_STR=mongodb+srv://admin:mongodbpass@cluster0-kiemb.azure.mongodb.net/reviewdb?retryWrites=true
SERVER_PORT=8117
BC_SAVE_ASSET_API=http://aarvm2.westeurope.cloudapp.azure.com:3000/membership/invoke/asset/registerAsset
APPINSIGHTS_INSTRUMENTATIONKEY=...
NODE_ENV=development
MEMBER_MANAGEMENT_SERVICE=http://137.116.151.106:9000/
BILLING_MANAGEMENT_SERVICE=http://137.116.151.106:9000/
ASSET_MANAGEMENT_SERVICE=http://137.116.151.106:9000/
Start the server
Run in development mode
npm run start
Run in watch mode
npm run start:watch
Run in production mode
npm run prod
Unit testing
Run jest unit tests
npm run test
Run unit tests in watch mode
npm run test:watch
Testing
The default URL is: http://localhost:8080
- GET all ratingReview objects
Send GET request to http://localhost:8080/ratingReviews
0.0.1
5 years ago