POSTMAN makes it easy to visualize the process

You want to create a simple server on node.js using node's basic http module or using Express. A quick way to do this would be to put it all in a single file like so after you've installed Express using npm install express:

var express     = require('express');
var app         = express();

This will be a very quick version of setting up the server and is not meant to be in depth. Next, you set up some quick and dirty routes just to the root url of your site.'/', function() {console.log('this is a POST');});
app.get('/', function() {
    console.log('this is a GET');

So, when you get a 'POST' request on the root url of your site, it will console.log "this is a POST" and if it's a 'GET' request it will console.log "this is a GET". Keep in mind this console.log will show up in your terminal where start your node server, not on the client (browser) side. And now you want to test your routes. A simple way to do this is to use curl with a command like this on the terminal:

$ curl -i http://localhost:8000

This will send a 'GET' request to the server you have running on localhost. The -i flag will give show us the header for the response from the server. At this point, we don't have any response coming back from the server.

However, another way to do this is to use a simple extension for Chrome called POSTMAN. POSTMAN gives you a graphical interface to visualize your requests to the server. The image below shows the Graphical User Interface for POSTMAN.

Postman App

As you can see, I'm sending a 'GET' request to my local server running on Port 8000. You can see in the image above that url for my route, my 'GET' method, and the response I got back from the server after clicking the "Send" button.

In the next example, I've got a website running on Azure's platform where I've set up a server route that is listening for a post request on a route that I've set up. Specifically, I've set it up to listen for 'POST's from Paypal's IPN server which will send off a message to my server route any time someone purchases something from me.

I'm using POSTMAN with some dummy data that I got from Paypal and have created a POST request with URL parameters. The data will be appended to my URL as parameters which is the way my listener is expecting the data. The great part about using POSTMAN is that i can take a URL that looks like some string a bazillion characters long and after pasting it in as the URL, I click the URL parameters button on POSTMAN and get a quick visualization of the data. It's just easier to know what is going on. And, you can easily visualize the response data after you click "Send".

I hope this quick introduction to POSTMAN will get you using it as a tool to interact with and troubleshoot any server routing issues you may have.