API Tester for your Backend Projects — Article Includes Example For Node.js Developers

Ahmet Arda Orak
2 min readMar 7, 2022

--

What is Postman

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs — faster.

Download for Windows:https://www.postman.com/downloads/. Also, Postman has Mac and Web versions.

Node.js Router Code Example — User Authentication

User Register Route — user.js

const User = require("../models/User");const router = require("express").Router();const bcrypt = require("bcrypt");//REGISTERrouter.post("/register", async (req, res) => {try {//generate new passwordconst salt = await bcrypt.genSalt(10);const hashedPassword = await bcrypt.hash(req.body.password, salt);//create new userconst newUser = new User({username: req.body.username,email: req.body.email,password: hashedPassword,});//save user and respondconst user = await newUser.save();res.status(200).json(user._id);} catch (err) {console.log(err);res.status(500).json(err);}});module.exports = router;

Route End at Index.js File

app.use("/api/users", userRoute);app.use("/api/pins", pinRoute);

Sending Post to The Route with Postman

So we created a route in the upper files. Let's send a POST request with Postman!

send a post request with postman

Type the route you want into the input bar then choose the format(the image upper includes a request in .json format) you want to send the request. Then send the request and view the response in the “Response” part. You can save the request tabs in Postman and this feature really simplifies your work.

Actually sending requests is only one of the basic features of Postman. It has many other incredible features and products like;

API client, API design, API documentation, API testing, Mock Servers, Api detection, Monitors…

Pricing

The pricing schema is up. But if you are a tester that only creates projects for portfolio or works with small projects. You can create thousands of POST, GET, etc. requests completely free!

Postman Company

Creator

Abhinav Asthana, Ankit Sobti, Abhijit Kane

You can see their LinkedIn accounts when you click.

Value

Postman is valued at over $5.6 billion dollars.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Ahmet Arda Orak
Ahmet Arda Orak

Written by Ahmet Arda Orak

Entrepreneur 📍 Leader At Young Leaders Over The Horizon 📍 Web Developer 📍 Mobile App Developer

No responses yet

Write a response