
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

4K+ Views
In this article, we will create a simple user sign-up form having some parameters. On clicking SAVE, all the user details will be saved in the MongoDB database.InstallationBefore proceeding to create the sign-up form, the following dependencies must be succesfully installed on your system.Check and install express by using the following command. Express is used to set middlewares to respond to HTTP requestsnpm install express --saveSetup the "body-parser" node module for reading the HTTP POST data.npm install body-parser --saveSetup "mongoose", as it sits on top of Node's MongoDB driver.npm install mongoose --saveExample 1Create the following files and copy paste the ... Read More

616 Views
readJson() method reads a JSON object and then parses it into an object.SyntaxreadJson(file [, options] [, callback])Parametersfile – String parameter which will contain name and location of the file holding the JSON.options – The 'outputFile' function supports the following options −encoding – Default 'null'.flag – Default 'r'. The flag 'r' opens a file for reading and an exception will occur if file does not exist.signal – allows aborting an ongoing output file functioncallback – This function will give a callback if any error occurs.Example 1Check that fs-extra is installed before proceeding; if not, install fs-exra.You can use the following command to check whether fs-extra is installed ... Read More

195 Views
In this article, we will see how to select or query the data from a database based on different table fields and columns.Before proceeding, please check the following steps are already executed −mkdir mysql-testcd mysql-testnpm init -ynpm install mysqlThe above steps are for installing the Node - mysql dependecy in the project folder.Select Data from Table Using NodeCreate a new file with the following name – app.jsCopy and Paste the following code snippet in this file.Now, run the following command to check the output of the above program.>> node app.jsExample// Checking the MySQL dependency – if exists var mysql = ... Read More

380 Views
Introduction to Async pathExists()This method will test whether the given path exists or not by checking with the file system. It will throw error in callback if the path does not exist.SyntaxpathExists(file[, callback])Parametersfile – This is the path of the file that needs to be checked in all the file systems.callback – This function will give a callback if any error occurs.ExampleCheck that fs-extra is installed before proceeding; if not, install fs-exra.You can use the following command to check whether fs-extra is installed or not.npm ls fs-extraCreate a pathExists.js and copy-paste the following code snippet into that file.Now, run the ... Read More

436 Views
Introduction to Async outputFile()This method is similar to write file of 'fs'. The only difference is it will create the parent directories, if not present. The argument passed should always be a file path, not a buffer or a file descriptor.SyntaxoutputFile(file, data[, options] [, callback])Parametersfile – String parameter which will contain name and location of the file.data – The data can hold a string data, buffer stream or a Unit8 string array that is to be stored.options – The 'outputFile' function supports the following options −encoding – Default 'utf8'.mode – Default 0o666signal – allown aborting an ongoing output file functioncallback ... Read More

502 Views
ReactJS and NodeJS both are a widely used subsets of JavaScript nowadays with high performance. But both are different in someways. In the below article, we will discuss the difference between the two and which is better to use to build a web application and why ?NodeJSIt is a completely open-source and cross-platform runtime environment used for executing JavaScript code outside of a browser.The event driven model of NodeJs lets the user to create a fast and scalable network applications. First thing to remember about NodeJS is that its neither a framework and nor a programming language. NodeJS is a ... Read More

192 Views
An exception is a type of an event that occurs while executing or running a program that stops the normal flow of the program and returns to the system. When an exception occurs the method creates an object and gives it to the runtime system. This creating an exception and giving it to the runtime system is known as throwing an Exception.We need to handle these Exceptions to handle any use case and prevent the system from crashing or performing an unprecedented set of instructions. If we donot handle or throw exceptions, the program may perform strangely.Exception handling in Synchronous ... Read More

354 Views
An exception is a type of an event, that occurs while executing or running a program that stops the normal flow of the program and returns to the system. When an exception occurs the method creates an object and gives it to the runtime system. This creating an exception and giving it to the runtime system is known as throwing an Exception.We need to handle these Exceptions to handle any use case and prevent the system from crashing or performing an unprecedented set of instructions. If we donot handle or throw exceptions, the program may perform strangely.Exception handling in Synchronous ... Read More

265 Views
An exception is a type of an event that occurs while executing or running a program that stops the normal flow of the program and returns to the system. When an exception occurs the method creates an object and gives it to the runtime system. This creating an exception and giving it to the runtime system is known as throwing an Exception.We need to handle these Exceptions to handle any use case and prevent the system from crashing or performing an unprecedented set of instructions. If we donot handle or throw exceptions, the program may perform strangely.Exception handling in Asynchronous ... Read More

5K+ Views
Like Image, we can also overlay text on an image using JIMP. This can be used to display brands or copyright information on images. The print() method is used to write text on images. Though Jimp can only support the Bitmap font format (.fnt), but other fonts can be converted into this format to be compatible and used with JIMP.Syntaximage.print(font, x, y, message);Definition of print() paramtersfont – This describes the font passed by the user for writing the text on image.x, y – The coordinates where the file will be placed.message – This is the user defined message which is passed in ... Read More