How To Create and Deploy a json-server

json-server is a tool for creating mock REST API fast! To get started, ensure you have the following requirements: NodeJS (npm) Let’s get started! On an empty folder, initiate a nodejs application by running the following on your terminal/CMD: npm init -y Once that is complete, you install the following packages: json-server json-serve cors nodemon (as a dev dependency) npm install json-server json-serve cors npm install -D nodemon After the installation, create a new file: index.js. This is the entry point for the json-serve. Add the following inside the file: ...

October 18, 2022 · 2 min · Chris Achinga

How to Create A Simple API: ExpressJS

Express JS is a backend framework that runs on Node JS. It really comes in handy when creating backend microservices for our applications. I will take you through simple steps in creating a simple API with Express. Installing dependencies This should be the simplest of all: On the project root, open up your terminal/CMD and install express using the following command: npm install express Create a server file While still on the root of your project, create a JavaScript file; app.js ...

August 3, 2021 · 2 min · Chris Achinga