AdonisJs official Blog

by Harminder Virk

NodeJs framework for Humans

Page 2

Hello Adonis - Journey to the future

Official Website

Being a JavaScript developer, I adopted Node Js in its early days and no matter what, it has been a joyful journey.

Npm being the largest package manager ( offers a bunch of tools to improve your everyday workflow. I myself have used nearly every popular package until I reached the point of saturation.

This saturation point is the real factor, I decided to write Adonis Js and approached things differently from all other libraries and frameworks offered by the community. This post is not a comparison to any existing frameworks, in fact, an opportunity to share the broader view of Adonis Js.

I generally receive questions on why to use Adonis Js over Sails Js or Express/Koa.

Express/Koa are thin wrappers over the Node Http server, which may be best suited for certain applications but the majority of applications requires

Continue reading →

Basic Authentication With AdonisJs

With the release of Adonis 2.0, i have received lot of queries on how to authenticate requests in Adonis.

Adonis is an MVC framework for NodeJs, it borrows the concept of Service providers from popular PHP Framework Laravel.

I personally divides authentications into two different parts. First the stateful authentication where we save cookies into browser and use it to find login state for a given user. Other one is the stateless authentication, where each request is authenticated.

The later one is quite popular with RestFul API’s, where we authenticate every API request and a common way to achieve that is to make use of Basic Auth.

In this article, i will share the process of writing a middleware and then authenticating routes with the help of basicauth middleware. Also the final code is available on

 Creating a new application

Continue reading →