- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mayank Agarwal has Published 410 Articles
Mayank Agarwal
202 Views
This method is used to empty a directory whether it is empty or not with a sync process. If the directory is not empty, it will remove all its contents and empty it. A new empty directory is created if the directory does not exist.SyntaxemptyDirSync(dir)Parametersdir – This is a string ... Read More
Mayank Agarwal
242 Views
Introduction to Async emptyDir()This method is used to empty a directory whether it is empty or not. If the directory is not empty it will remove all its contents and empty it. A new empty directory is created if the directory does not exist.SyntaxemptyDir(dir, [, callbacks])Parametersdir – This is a ... Read More
Mayank Agarwal
479 Views
You can delete an existing table from MySql Database using the "DROP TABLE" statement in Node. Sometimes, we need to delete the whole table, though in corporates it is always advised to archive the tables which are not in used instead of deleting them.While deleting a table, we have two ... Read More
Mayank Agarwal
395 Views
NodeJS is a JavaScript runtime environment that was built on top of Chrome's V8 engine. The traditional use of JavaScript is to be executed in browsers, but with Node.JS we can execute JavaScript other than browsers like servers, hardware devices, etc.process.cwd()The process object lies under the global object known as ... Read More
Mayank Agarwal
840 Views
Both the methods – console.log and process.stdout.write have a basic definition to write or print the statements on the console. But, there is a slight difference in the way they execute these tasks. Internally, console.log implements process.stdout.write which itself is a buffer stream that will be used to directly print ... Read More
Mayank Agarwal
557 Views
After insertion, we need to delete records as well. The records should can be deleted based upon an identifier from the database table. You can delete records from table using "DELETE FROM" statement.We can delete the records from MySql DB in two ways −Static Deletion - In this type of ... Read More
Mayank Agarwal
641 Views
Generally, NoSQL databases (like MongoDB) are more popular among the Node developers. However, it totally depends upon your usecase and choice to choose any DBMS from different database options present. The type of databse you choose mainly depends upon one's project's requirements.For example, if you need table creation or real-time ... Read More
Mayank Agarwal
2K+ Views
Introduction to SequelizeSequealize follows the promise-based Node.js ORM for different servers like – Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server.Following are some of the main features of NodeJS sequelize −Transaction SupportRelationsEager and Lazy LoadingRead Replication and more...Connecting to MySQL using SequelizeWe need to establish a connection between MySQL and ... Read More
Mayank Agarwal
1K+ Views
Introduction to mongodb.connectThis method is used to connect the Mongo DB server with our Node application. This is an asynchronous method from MongoDB module.Syntaxmongodb.connect(path[, callback])Parameters•path – The server path where the MongoDB server is actually running along with its port.•callback – This function will give a callback if any error ... Read More
Mayank Agarwal
624 Views
Introduction to Async copyThis method copies files or directories from one location to another location. The directory can have sub-directories and files.Syntaxcopy(src, dest[, options][, callback])Parameterssrc – This is a string paramter which will hold the source location of the file or directory that needs to be copies. If the location ... Read More