Categories
Express.js

Express js – Zip and download files

Categories
Express.js

Express js – Upload images to Azure Blob Storage

Categories
Express.js

Express js upload and save base64 image into File System

Categories
Express.js

Azure CSP – Partner Center authentication with Node JS

In this post, I will show you Azure CSP partner center authentication with Node JS. We gonna use express JS as an application framework and the Request module to make HTTP calls to Azure REST APIs. Initiate the project with npm init –yes, it will create a file called package.json in the current folder. Now […]

Categories
Express.js

Send Email using SendGrid in Express.JS application

In this arti­cle, I will demon­strate a sim­ple exam­ple of send­ing emails using SendGrid in Express/ Node.js. Fortunately sending emails in express/node js pretty easy with SendGrid using @sendgrid/mail npm package. For sending HTML emails we are going to use template engine called pugjs, this project was formerly known as Jade. Create package.json file and […]

Categories
Express.js

Implement role based access control, JWT, Express.js , Node.js

In this post, We gonna build an access control layer using express-jwt-permissions for express based application. ACL will keep users from accessing information not meant for them. We gonna create the express.js application to role-based access control example. let’s create a folder called aclJWTExpress After creating, change the directory to aclJWTExpress Now initialize the project […]

Categories
Express.js

API Caching with Redis and Node.js

In this post, I would like to show you, how we can use Redis to Cache APIs response to avoid multiple hits to the API. Same technique you can use to avoid multiple database calls ..etc We gonna create the express.js application to demonstrate Redis cache example. let’s create a folder called redisCahceExample After creating, […]

Categories
Express.js

How to Access Azure REST APIs with Node JS.

In this post, I will show you can access the Azure REST APIs. In order to access the Azure APIs, we need following details- tenant ID, client ID(application ID), client secret and subscription ID. So let’s grab all the above-mentioned details from your Azure portal. Lets login to the Azure portal by visiting https://portal.azure.com How […]

Categories
Express.js

How to enable CORS in Express.js

In this post, you will learn about Cross-Origin Resource Sharing. Http requests are restricted by the same-origin policy, which means where scripts can be loaded from the same Origin. Specifically, the protocol, domain, and port must match. It means you can’t send the request to other origins, this restriction is there for a security reason, […]

Categories
Express.js

Building REST APIs with ES6, Node.js, Express, and MongoDB

In this tutorial, we will use ES6 syntax to build REST APIs. we will set up Babel to work with ES6 and we’ll be building a RESTful CRUD (Create, Retrieve, Update, Delete) API with Node.js, Express, and MongoDB. We’ll use Mongoose for interacting with the MongoDB instance. Creating the Application Fire up your terminal and […]

Categories
Express.js

How to serve Node js app with NGINX reverse Proxy

In this post I will show you How we can use NGINX web server as Revers Proxy server. NGINX is very powerfull, It can handle at least 10,000 simultaneous client connections on a single server with its event driven architecture. In simple words NGINX is – Open source and its free to use. – High […]

Categories
Express.js

RESTful API Using async, await – Node, Express and sequelize

By reading this tutorial you can build RESTful APIs using Node, express, and Sequelize ORM. You gonna use the different HTTP methods during the REST API development, quick introduction about each method. GET to retrieve data POST to add data PUT to update data DELETE to delete data Each method as a purpose isn’t it?. […]

Categories
Express.js

How to insert initial dummy data using sequelize seeds/Faker -Draft

This post is extension of my previous post, Build a RESTful API Using Node, Express and sequelize . From the previous post you can learn and setup your restful APIs. In this post, I would like to show creating or inserting dummy data using sequelize seeds/Faker library.

Categories
Express.js

Build a RESTful API Using Node, Express and sequelize

By reading this tutorial you can build RESTful APIs using Node, express, and sequelize ORM. You gonna use the different HTTP methods during the REST API development, quick introduction to each method. GET to retrieve data POST to add data PUT to update data DELETE to delete data Each method as a purpose isn’t it?. […]

Categories
Express.js

Download a file from NodeJS Server using ExpressJS

I this tutorial you will learn how to download files from your NodeJS server from your express js application. As your application is built using the ExpressJS framework you don’t have to play around with HTTP headers to allow downloads form your Node server. Express providing Helper function called res.download(path [, filename] [, fn]); It […]