Sign in

A Computer Science Student

Hello Peppos!!

T’day we are going to use an API to get data from covid stats in a week from a json file and present it in the following ways:

  • List number of new cases (every day of the week).

For any problems in the way, here’s my repository with the final result:

Preparing the API

After creating the folder that will host the project, we initiate the project with:

Hello Peppos!!

Ever wanted to share tasks between your computers/servers?

Worry no more, because today you are going to learn how to implement hadoop on your machines.(only the connecting part tho …).


Hadoop has 2 essential parts:

  • HDFS —A Distributed File System that loads data in machines inside the Cluster.

Hello Peppos!!!

A Distributed system, at the most basic level, it’s a collection of computers or systems that are ‘combined’ to form a single computer for the user, if one system fails it doesn’t damage the whole system, they all have one shared state and operate concurrently.

They are connected through a network to share information easily, this connection can be an IP address or even cabling.

This article was based on the following articles:

Types of Distributed Systems

These systems may be Client/Server Systems (Distributed) or Peer to Peer Systems …

Client/Server Systems

Hello Peppos!!!!

So you want to upload and downloads files from your API, worry no more cause in this tutorial we are going to implement a solution that does exactly that using LoopBack 4.

Getting the Packages and Creating the project

First things first, get the Loopback 4 Package to start building the API.

npm install -g @loopback/cli

Then to create a new project:

lb4 app

Answer the following questions this way for the App(or conforming to your project needs):

? Project name: Upload-Download
? Project description: An API made with LoopBack 4.
? Project root directory: (upload-download)
? Application class name: (UploadApplication)
? Select features to enable in the project…

Hello Peppos!!!!

So you have made your first node.js application, and you need a way to document your methods, variables and paths to the world.

Worry no more cause the Swagger package is here to help you.

This little package makes a fancy and organized interface that shows all the documentation that you insert into it.

Here’s an example of the full project that we will do today:

Hello Peppos!!

Today we are going to add Authentication to the Todo App that we previously made to make the application’s API more secure.

LoopBack4 has a Authentication package with the name of @loopback/authentication in which secures your app’s API’s endpoints with custom authentication strategies and an @authenticate decorator.

This tutorial is based on the tutorial on the LoopBack4 Website.

Take a look on the final project if you have any problems or errors in the making of this tutorial.

JSON Web Token Approach

Hello Peppos!!

LoopBack is a Node.js and TypeScript framework based on Express, open-source and Highly customizable. It allows you to quickly create APIs in a really easy way.

In this tutorial we are going to create a Todo App API using this framework, make sure that Node.js and MongoDB are installed before doing this project.

This tutorial is based on the Todo Tutorial made by LoopBack4.

Installing and running LoopBack4 for the first time

Installing LoopBack4 is as easy as running the following command:

npm install -g @loopback/cli

Then to create a new project:

lb4 app

Answer the following questions this way for the Todo App(or conforming to…

Hello peppos!!

Today we are going to make a CRUD app using the mongoDB database (i made a tutorial on installing on manjaro here) and using Node.js (install tutorial here, also on manjaro).


Building the Environment…

After creating the folder that will host the project, we initiate the project with:

npm init

Also, we will need the following packages:

  • Express.js — Framework that allows developing of web apps in a simple way.

Install the needed packages with:

npm install --save express body-parser mongoose

Create the index.js

Hello peppo!

You can probably use this tutorial on Arch (although if you are using Arch you probably know more than me), but i think this tutorial doesn’t translate very well to Debian based systems, but don’t worry, there are many tutorials out there to help you.

NOTICE: The yay package manager will be necessary.

Getting the package

To get the mongodbpackage wefirst need to get a package to extract that kind of packages called base-devel :

yay -S base-devel

And select all the repository cores

Then get the mongodbwith:

yay -S mongodb

If you want UI interface get the mongodb-compass with:


REST Architecture

REST REpresentational State Transfer is an architecture model that uses the HTTP protocol for communication with the GET, POST, PUT and DELETE methods.

The best known representation methods to present a resource are JSON and XML. For more info click here.

Starting out…

After creating a directory for our project you need to…

  • Initialize the project.
npm init
  • Get the needed packages.
npm install --save hapi


Postman is a great tool when trying to dissect RESTful APIs for testing. …


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