Skip to content

techy1999/BlogBackend

Repository files navigation

Node.js CI

Nomads Blog Backend

System Design

nomads solutiondd

Technology

  • Nodejs
  • Express
  • Mongodb
  • Mongoose
  • Swagger
  • AWS

Packages used:-

  • 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

Response Format


{
  "error": {
    "message":"your message",
    "description:"from code",
  },
  "message": null,
  "httpStatus": 401,
  "data": null
}

Check API Documentation at END point

/api-docs

apidocs

How Creating Indexing mongodb efficiently increase our search query

  • MongoDB mainly uses COLSCAN and IXSCAN
  • 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.

See below screenshot to understand it.

Before Creating Index, we search all through the document to find out our document, see documentscaned-27 and returned-6 Left Image

After Creating Index, we search onB-tree , see documentscaned-6 and returned-6 Right Image

PM2 monitor for application monitoring

Releases

No releases published

Packages

No packages published