Posts

Showing posts from July 11, 2020

Build your own REST API from scratch - Part 1

Image
RESTful API is a key program interface that allows connectivity for endless amount of applications.  I have actually published an article with a brief introduction to REST API which you can find in this blog post .  In this article we are going to kick it up a notch and go step by step in building our own REST API from scratch.  Choose your weapon... For this task we are going to need the following: nodeJS npm express Visual Studio Code  Create our project First of all, I'm going to create my project folder, and open it in vs code. Next, I will open a new terminal in VS Code and execute $npm init . For this simple example we can leave everything at default and just hit Enter/return to finish our setup. Next, I am going to install my dependencies by running $npm install. Once the setup is finished, I am going to see my project folder populated with package.json, package-lock.json files, and the node_modules folder. which will contain my dependencies.  Let's start writing our cod