Category: Nodejs
-
How Do We Use Node.Js For Caching?
To provide a flawless user experience, performance optimization is essential in the realm of web development. Your Node.js applications’ performance and responsiveness may be considerably improved with the help of the potent method of caching. You may decrease database queries, lower server load, and guarantee quicker load times for your users by carefully storing and […]
-
How to Asynchronous Node.js Error Handling With Strategies And Practices?
Building strong and dependable apps requires careful error handling, particularly in the asynchronous Node.js environment. When it comes to managing failures, asynchronous programming has special difficulties since conventional try-catch blocks might not function as intended. This post will discuss appropriate error-handling techniques and tactics for asynchronous Node.js apps. Knowing how to handle asynchronous errors Asynchronous […]
-
How does FileSystem work on NodeJS?
The well-known runtime Node.js, which is based on Chrome’s V8 JavaScript engine, is widely used due to its effectiveness and adaptability. Working with the file system is one of its strong points, enabling developers to execute different file operations with ease. In this blog article, we’ll delve into the realm of Node.js file system operations, […]
-
How to use nodemailer in node js?
Whether used for personal or professional reasons, email communication is still a crucial aspect of our lives in the digital age. A robust JavaScript runtime called Node.js provides a number of tools that make a variety of tasks—including sending emails—easier. Nodemailer is one such well-liked package that helps programmers to easily incorporate email capabilities into […]
-
How to Interact with NodeJS REPL?
In the world of programming, the ability to test and experiment with code snippets in an interactive environment is invaluable. This is where REPL (Read-Eval-Print Loop) comes into play, and Node.js offers a robust REPL environment for JavaScript developers. In this blog post, we’ll dive into the concept of Node.js REPL, its features, and how […]
-
Google Custom Search with NodeJS
Goo Google provides a custom search API by which you can use the power of google search engine in your own application. The base URL for the REST version of custom search API is: https://www.googleapis.com/customsearch/v1 Before moving on to integration part, we need two things. API KEY Search Engine ID The API KEY can be […]
-
Bing Search API with NodeJS
Bing provides a search API by which you can use the power of bing search in your own application. The base URL for the search API is: https://api.cognitive.microsoft.com/bing/v7.0/search The code to integrate the API using Express and Node JS is: The API Subscription Key can be created at the website: https://azure.microsoft.com/en-in/services/cognitive-services/bing-web-search-api/ If you want more […]
-
Introducing Socket.io
Socket.io Web applications, for example, Facebook, Twitter, or Gmail are consolidating constant abilities, which empower the application to consistently give the client as of late refreshed data. When you include the Socket.io module, it provides you with two objects: a socket server object that is responsible for the server functionality and a socket client object […]
-
Meteor Methods vs REST API
Many of you must have used MeteorJS Methods and have often mistook them for an analogue of REST API. Although Meteor Methods are similar to POST API request but they are quite different. The main difference between the two is that Meteor Methods are DDP (Distributed Data Protocol) messages and are based on RPC (Remote Procedure […]
-
File Structure in Meteor App
The four basic types of directories that must be defined inside any Meteor App are /client,/server, /public and /lib. These directories are special and when it comes to coding, Meteor has few rules: Code inside /server directory only runs on the server. Code inside /client directory only runs on the client. Everything else runs on […]
-
Hapijs – views
There are two ways for rendering a view by using reply.view()interface, or by using view handler. – reply.view() [cc lang=”javascript”]server.route({ method: ‘GET’, path: ‘/’, handler: function (request, reply) { reply.view(‘index’); } });[/cc] if you want to pass context to reply.view(), pass an object as the second parameter, for example: [cc lang=”javascript”]server.route({ method: ‘GET’, path: […]
-
How to install Meteor on your System
Meteor’s install process is relatively simple and you can run it in less than five minutes. To begin with, if you’re using Mac OS or Linux you can install Meteor by running this command in Terminal Window. curl https://install.meteor.com | sh If you are running Windows, download .exe file from below link. https://install.meteor.com/windows or, refer […]
-
Build Your First HTTP Server in NodeJS
In this tutorial, we will be talking about how we can set up a simple NodeJS HTTP server with a beginner’s perspective. NodeJS is a fantastic candidate for creating web servers which are light weight and can handle a very good volume of requests. NodeJS is shipped with several core modules out of which we […]
-
Hapijs – Adding Routes in HapiJs
In this blog, we will learn how to Adding routes in Hapi. Steps. – Define the path. – Define the method. – Define the handler. let’s see an example of it [cc lang=”javascript”] var Hapi = require(‘hapi’); var server = new Hapi.Server(); server.connection({ port: 3000 }); server.route({ method: ‘GET’, // define the method path: ‘/’, […]
-
Hapijs – Plugins
hapi has dozens of plugin system. like , Authentication, Documentation, Localization/Internationalization, Logging/Metrics, Messaging, Security, Session, Templating, Utility, Validation…. – you can write your own plugin. – plugins are objects with a register function, and has a signature function (server, options, next). – register function has an attributes object. – this object provides some additional information […]
-
Node.js tutorial – How to use Request Module
In any application framework, one basic need is to be able to make REST calls over HTTP/HTTPS as they are widely used and a very handful in case of API interactions, web scraping, etc. We can use the NodeJS core modules or http https to perform these calls but that is a bit cumbersome process and […]
-
Setup an environment for working with react.
In order to setup an environment for working with react we can use the create react package. To install create react package. npm i create-react-app -g After installing crate-react-app package, genrate simple react app by using following command. create-react-app <dir> example:-create-react-app first-react-app This might take a couple minutes. cd first-react-app Start the app:- npm start […]
-
How to use paytm in your website to add money to your wallet using javascript.
Paytm wallets are used in almost all the websites we encounter these days. Also it is one of the best wallet used for handling digital transactions. Although Paytm has provided us with the direct API for checking balance and making payments if we have sufficient balance in our wallet. But what if we do not […]
-
Creating First App in Meteor
I have explained how to install Meteor on your System in my previous blog. This blog will explain how to create first App in Meteor following these simple steps. Step 1. We use Meteor’s command line tool meteor: [cc lang=”javascript”]meteor create microscope[/cc] This command will download Meteor, and set up a basic, ready to use […]
-
How to install hapi and how to create server in hapi.
Installing hapi. In this section we will learn how to install hapi. Creating new server. In this section we will learn how to create a server in hapi. In this blog we will learn how to install hapi and how to create server in hapi. Installing hapi. In this section we will learn how to […]
-
How to use redis with node.js
In this tutorial you’ll learn how to work with Redis in Node.js. Redis is an open source advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. In Node.js you can use several modules to interface with Redis server, but […]
-
Learn How To Use Neo4j With Node.js
In this tutorial you discover how to work with the Neo4j graph database in Node.js. Graph databases are very useful when you want to store and query highly connected data. Neo4j is a database that can efficiently store, handle and query highly connected elements in your data model. Neo4j has a powerful and flexible data […]
-
NODE.JS TUTORIAL – HOW TO USE REQUEST MODULE
In any application framework one basic need is to be able to make REST calls over HTTP/HTTPS, they are widely used and very useful in cases of API interactions and web scraping. We can use the Node.js core modules http or https to perform these calls but that that can be a cumbersome process and the Request module makes it simple to perform […]
-
INTRODUCTION TO GRUNT
Grunt, simply defined, is a task runner built over Node.js that can be used to automate certain tasks in almost any project, in any language. Grunt and Grunt plugins are installed and managed via npm. If you’re unaware, npm is a package manager that provides a central repository for custom open source modules for Node.js […]