Push and Pop Items Into MongoDB Array Via Mongoose in Node.js

mongoDB Monoogse Schema

How To Push or Pop Items Into MongoDB Document Array Via Mongoose in Node.js (Express.js)   If you’re Developing your Rest API’s using Node.js or Express.js, Then You’re probably using MongoDB as Database for Storing Data and Probably with mongoose ODM for working with MongoDB Database.Now as you’re DB starts to grow and you have multiple … Read more

How To Access the request object inside a GraphQL resolver Function (Apollo-Server-Express)

If you’re working with GraphQL (a query language for your API), and you’re using apollo-server-express, You may notice unlike express-graphql, request object will not be available in context, if it’s not defined in apollo-sever-express middleware, but don’t worry, if want request object available in context, just use following quick hack, not really and you’re done. normal apollo-server-express … Read more

MongoDB chat schema and Mongoose chat schema for Chat Application

mongoDB Monoogse Schema

If you’re using NoSQL MongoDB for your next chat application, then below, you will find the best example of schema designs for you MongoDB chat application,  In this Tutorial, we will discuss MongoDB chat schema and Mongoose chat schema for Chat Application. Before you proceed, things to keep in mind: Design schema according to the requirements of … Read more

npm self update – Selfupdate your global NPM package

nodejs npm

npm is the package manager for JavaScript and the world’s largest software registry.Daily thousands of packages downloaded using npm and It would be really good to auto-update npm or self update npm. Isn’t it an awesome hack? Yes, it is.all thanks jviotti. Who developed a node package to auto update npm globally using command line command, we … Read more

auto-refresh page once only after first load – Using JavaScript / JQuery

In this Javascript How-To Tutorial, we are going to learn a very useful technique. We will discuss multiple ways to One-time page refresh after the first-page load automatically using Javascript or JQuery. Javascript can be very useful for Frontend and Backend Development, The one language to rule them all, as they say. Let’s consider Your Developing … Read more

NPM unistall unused packages in Node.js

nodejs npm

Consider, you’re developing a shiny new node.js project and according to your need, design, and business logic, you’ve installed many NPM packages, but at the end you realized, that you don’t need many packages, so now you want to remove all unused npm packages and sub-modules of it, which is not defined in package.json, for that … Read more