Serverless backend may also be called Backend as a Service (Baas) and Function as a Service(Faas).

According to Wikipedia, Serverless computing is a cloud computing execution model in which the cloud provider allocates machine resources on-demand, taking care of the servers on behalf of their customers.

Pros of a Serverless architecture

  1. Serverless is inherently scalable, it will be able to handle an unusually high number of requests.

Cons of a Serverless architecture

  1. Serverless is not built for long-running processing, it has a time frame. …


Credits: Household beautiful

A decorator is a function that takes in a function as an argument and alters its behaviour without modifying the underlying function. It is written as a function closure.

Decorators vs Higher order functions

A higher-order function is a function that takes one or more functions as arguments returns a function as its result while a decorator takes is a function that takes in a function as an argument and alters its behaviour. Decorators mutate the variable while higher order functions are recommended not mutate the variable. Practically, decorators and higher order functions do the same thing.

Examples

Created a powerOf function that takes…


There are different type of software testing, they include, unit testing, integration testing, beta testing, smoke testing, alpha testing, etc.

Unit testing is a type of software testing where an individual software component or module or function is been tested.

In this tutorial, we’ll be using Mocha and Chai for unit testing.

Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.

Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework. …


I decided to write this short article on how to use populate() in Mongoose. I was trying to implement relationships in NoSQL environment as I did easily with SQL but I ran into issues because I thought NoSQL would handle it for me. With the help of a friend, I was able to fix it.

Populate() lets you reference documents in other collections.

In this article, we will be working with two collections; company collection and project collection. Company collection has many projects

company.js

We just created the company model that contains the name and also projects. So, the…


In my previous article, I wrote an introduction to web scraping using Puppeteer. Click here to view the post.

In this article, I’ll be writing about performing end to end testing in React with Puppeteer and Jest.

There are different type of software testing, they include, unit testing, integration testing, beta testing, smoke testing, alpha testing, end to end testing(e2e) etc.

End-to-end or e2e testing is a type of software testing that is used to test the flow of the Application to make sure behaves as expected. The whole essence of end-to-end testing is to test from the end user’s…


Web scraping simply means extracting data from websites. It can be done manually and it can be automated using a bot or web crawler.

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default but can be configured to run full (non-headless) Chrome or Chromium.
Most of the things you can do manually with your browser can be done using Puppeteer. Examples include, generate screenshots and PDFs of pages, automate form submission, UI testing, scrape web pages etc.

Headless vs Non-Headless mode

Headless mode is when…


Travis CI is a hosted continuous integration service used to build and test software projects hosted at GitHub. It runs your test files. So, if all your tests pass, your Travis badge will show passing or else it will show failing. You can add the badge to your GitHub account.

Continuous Integration (CI) is the practice of merging all developers’ working copies to shared mainline several times a day.

Coveralls is a hosted analysis tool, providing statistics about your code coverage. Line-by-line test coverage reports and statistics gives engineering teams insight to spot gaps where bugs may be hiding. Your…


Heroku is a cloud platform that lets companies build, deliver, monitor and scale apps — we’re the fastest way to go from idea to URL, bypassing all those infrastructure headaches.

One beautiful thing about hosting your API is that it’s free but you’ll get .herokuapp appended to your URL. Heroku has a lot of addons for your project ranging from data stores to monitoring to logging to caching etc.

There are at least two ways to host your API on Heroku.

  1. Heroku CLI

Heroku CLI

Create an account on Heroku

Install Heroku globally on your local machine using npm npm…


API documentation is a quick and concise technical document that contains information on how to effectively use an API

Developers are expected to spend quality time to write detailed documentation for the APIs they create because good APIs are the ones that have sufficient documentation.

One of the easiest to create documentation for your API is by using Postman. It’s very easy to use, all you need is to have Postman installed on your PC.

Steps to document your API with Postman

Having installed Postman on your PC, create an account on Postman, create a new collection on Postman


What is MongoDB?

MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need. It is a NoSQL database. Instead of using tables and rows in a relational database, you will use collections and documents.

What is Mongoose?

Mongoose is an elegant MongoDB object modelling for Node.js. It provides an Object Data Modeling (ODM) environment that wraps the Node.js native driver. It makes it easier to use MongoDB with Nodejs.

To set your local environment ready for MongoDB

Install MongoDB on your local machine. Install MongoDB for Windows, Mac, Ubuntu

To check if MongoDB was installed successfully, open your command-line interface and execute mongod…

Benjamin Ajewole

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store