0.0.1 • Published 4 years ago
asset-search v0.0.1
Asset Search Microservice
This is REST API for: "Searching assets."
DevOps Related
Requirements
We need to install Node Js from NodeJS
Install global TypeScript and TypeScript Node:
npm install -g typescript ts-node
Build Project
- Clone this repository
Clone repo
- Then install the dependencies
npm install
- Then build the project
npm run build
Set Environment Variables
- Production & Staging
MONGO_CONN_STR=A different mongo db instance
SERVER_PORT=8081
APPINSIGHTS_INSTRUMENTATIONKEY=...
- QA
MONGO_CONN_STR=A different mongo db instance
SERVER_PORT=8081
APPINSIGHTS_INSTRUMENTATIONKEY=A different key value to indicate the environment in azure insights
- Dev
MONGO_CONN_STR=mongodb+srv://admin:mongodbpass@cluster0-kiemb.azure.mongodb.net/assetsDB?retryWrites=true
SERVER_PORT=8081
APPINSIGHTS_INSTRUMENTATIONKEY=...
Start the server
- Run in development mode
npm run dev
- Run in production mode
npm run prod
Test the Service
To test if the service is running use the following link to view the swagger file:
http://hostmachineIPorName:8081/docs/
Development and QA Related
Service Interface
- For details regarding servince endpoints, their inputs, and outputs refer to the following URL:
http://localhost:8081/docs
For locally hosted Service
http://52.163.115.175:8081/docs/
For Service deployed on development environment
Events
- Published Events
No events published
Event Name:
Event Args:
Trigger:
- Subscribed Events
No events subscribed
Event Name:
Args Expected:
Handling:
0.0.1
4 years ago