How to create Basic Express API
Today, I will Explain How to build an Express API in a few lines.
3 min readOct 21, 2021
You probably heard of Express, which is a back-end web application framework for Node Js. It’s designed for building web applications and APIs
Let’s get started
- We need Node to be installed on our machine. if you don’t have Node, you can download it. https://nodejs.org/en/download/.
- Open an empty project type npm init inside your Terminal to create our package.json
- Install express by typing npm install — save Express
- Create a file Called Server.js or whatever you want to call it.
- Create an instance called app from Express and listen to port 3000.
- Open the Terminal Again and type
node server.js
As you can see Now, Our Server is listening at http://localhost:3000.
- We are not done yet. We have our Server working and listening at…