-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApi.txt
26 lines (17 loc) · 883 Bytes
/
Api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1. Application Port:
a. FrontEnd: 3000;
b. Backend : 8080;
c. ElasticSeach Container : 9200; locally in Docker
d. Kibana Container : 5601; locally in Docker
2. Api's:
a. Getting all book: localhost:8080/books
This will give you all books
b. Get a single book localhost:8080/books/:id
The id will query on mongodb for particular book whose ObjectId matched with req.param.id;
c. Create a Book localhost:8080/books
It will add in mongodb database and also index the book in elastic search;
d. Update the book localhost:8080/books/:id
It will update the book in mongodb as weel as in elasticsearch;
e. Delete the book localhost/book/:id
It will delete a particular entry from both elasticsearch and mongodb
Note: For operation on elsticsearch i'm using pre and post hook of mongoose.