Build Your First Router in Node.js with Express
Express.js  is a powerful framework for node.js. One of the main advantages of this framework is defining different routes or middleware to handle the client’s different incoming requests. In this article, we will discuss, how to use the router in the express.js server....
read more
Express.js req.path Property
The req.path property contains the path of the request URL. This property is widely used to get the path part of the incoming request URL....
read more
How to validate if input in input field has base64 encoded string using express-validator ?
In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. If In a certain input field only base 64 encoded string are allowed i.e there not allowed any other form of string which not constitute base64 encoded string. We can also validate these input fields to accept only base 64 encoded string using express-validator middleware....
read more
Express.js | app.route() Function
The app.route() function returns an instance of a single route, which you can then use to handle HTTP verbs with optional middleware. Use app.route() to avoid duplicate route names (and thus typo errors)....
read more
Express.js req.method Property
The req.method property contains a string corresponding to the HTTP method of the request which can be either GET, POST, PUT, DELETE, etc....
read more
What is Express Generator ?
Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recollect that NodeJS isn’t a framework, and it’s not a programing language. In this article, we will discuss the Express Generator....
read more
What is MEVN Stack ?
What are web stacks?...
read more
How to validate if input in input field has decimal number only using express-validator ?
In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, only decimal numbers are allowed i.e. there not allowed any strings, special characters, or anything other than a decimal number. We can also validate these input fields to accept only decimal numbers using express-validator middleware....
read more
Express.js app.engine() Function
The app.engine() function is used to register the given template engine callback as ext. By default the Express itself will require() the engine based on the file extension....
read more
What is the use of router in Express.js ?
Express.js is a powerful framework for node.js. One of the main advantages of this framework is defining different routes or middleware to handle the client’s different incoming requests. In this article, we will discuss, how to use the router in the express.js server....
read more
How to validate if input in input field has alphabets only using express-validator ?
In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, only alphabets are allowed i.e. there not allowed any number or special character. We can also validate these input fields to only accept alphabets using express-validator middleware....
read more
How to implement file uploading and downloading with Express ?
File uploading and downloading are important features of a web app. Here we are going to handle file upload using express-fileupload npm package, and the download is handled using res.download() function of the express. The express-fileupload is passed to the app as the middleware....
read more