- Nodejs
- Express
- Mongodb
- Mongoose
- Swagger
- AWS
-
Morgan
- A package that show the requested URL and response.
-
Swagger-ui-express
- To create UI with the api endpoints
-
Swagger autogen
- A package that autmatically generate the api documentation
-
dotent
- Access Env value, in future replace with aws parameter fetch
-
mongoose
- Mongodb ODM
-
Helmet
- Security package to increase the security of the application.
-
express-rate-limit
- Rate limiting on the request , keep it updating depending on requirements.
Tools -
- aws for hosting
- CI/CD Pipeline
- swagger for api documentation
{
"error": {
"message":"your message",
"description:"from code",
},
"message": null,
"httpStatus": 401,
"data": null
}
/api-docs
- MongoDB mainly uses
COLSCAN
andIXSCAN
- Current we have only index on title
title_1
, as it will impact write performance.Because Internally Indexes uses B-tree which take time to sort and arrange in Balancing the tree.
Before Creating Index, we search all through the document to find out our document, see
documentscaned-27
andreturned-6
After Creating Index, we search onB-tree , see
documentscaned-6
andreturned-6