Skip to content
Singhak
  • Home
  • Tech
    • Javascript
    • Python
    • QnA
    • TipsnTricks
    • Automation
  • Blog
  • Submit Guest Post
  • About me
    • Contact Us
    • Privacy Policy
  • Toggle website search
Menu Close
  • Home
  • Tech
    • Javascript
    • Python
    • QnA
    • TipsnTricks
    • Automation
  • Blog
  • Submit Guest Post
  • About me
    • Contact Us
    • Privacy Policy
  • Toggle website search

nodejs

  1. Home>
  2. nodejs
Read more about the article dirname and filename in nodejs es6 module
Photo by Pixabay on Pexels.com
Javascript / Tech

dirname and filename in nodejs es6 module

In Node.js with ES6 modules, you can use the import.meta.url to get the current file's URL, and then use the URL module to extract the directory name and file name.…

0 Comments
8th March 2025
Read more about the article Add createdAt and updatedAt in mongoose schema using timstamps | Mongoose Timestamp
Database / MongoDB / TipsnTricks

Add createdAt and updatedAt in mongoose schema using timstamps | Mongoose Timestamp

Mongoose schemas support a timestamps option. If you set timestamps: true, Mongoose will add two properties of type Date to your schema: createdAt: a date representing when this document was createdupdatedAt: a date representing when…

0 Comments
13th June 2022
Read more about the article Unhandled promise rejection warning node js
Javascript / Tech

Unhandled promise rejection warning node js

This means that a promise you called rejected, but there was no catch used to handle the error. Add a catch after the offending then to handle this properly. The origin of this error lies in…

0 Comments
28th March 2022
Read more about the article MongoParseError: options usecreateindex, usefindandmodify are not supported
Database / MongoDB

MongoParseError: options usecreateindex, usefindandmodify are not supported

The error is because of the new version of the mongoose i.e version 6.0.6. useNewUrlParser, useUnifiedTopology, useFindAndModify, and useCreateIndex are no longer supported options. Mongoose 6 always behaves as if useNewUrlParser, useUnifiedTopology, and useCreateIndex are true, and useFindAndModify is false. Please remove…

0 Comments
31st January 2022
Read more about the article btoa is not defined error in node js | buffer in node js
Javascript / Tech / TipsnTricks

btoa is not defined error in node js | buffer in node js

The btoa() function takes a JavaScript string as a parameter. In JavaScript strings are represented using the UTF-16 character encoding: in this encoding, strings are represented as a sequence of 16-bit (2…

0 Comments
15th November 2021
Read more about the article Move folder files via ssh using NodeJS | sftp using NodeJS
Javascript / TipsnTricks

Move folder files via ssh using NodeJS | sftp using NodeJS

Using NodeJS we can create ssh connection to send file or executing any command on Linux based server. Here we are using npm module ssh2 for sftp connection to transfer…

0 Comments
6th September 2021

Buy Me a Coffee

Follow Us

Join Telegram Channel

Categories

Archives

Subscribe

Recent Posts

  • 🚀 Understanding call(), bind(), and apply() Like a 5th Grader!
  • dirname and filename in nodejs es6 module
  • An import declaration can only be used at the top level of a module
  • 🚀 export vs export default in JavaScript Modules
  • 🚀 Understanding Prototype in JavaScript

Menu

  • Home
  • Submit Post
  • Privacy Policy
  • About me
  • Guest Post Submission
  • Contact Us
Support Me

Buy Me a Coffee

Copyright 2021 - Singhak
pixel