Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expressjs REST API explorer

I've been playing with loopback and it has very nice API Explorer (somehow reminds me Java's JMX), apparently it is integrated inside the framework itself.

Is there a simple way to recreate the same experience with any of the npm packages? If not, how do you expose your API to clients side devs in a convenient way except a google doc?

enter image description here

like image 716
Pavel 'PK' Kaminsky Avatar asked Dec 27 '14 21:12

Pavel 'PK' Kaminsky


People also ask

Is Express JS REST API?

Restful API is very popular and commonly used to create APIs for web-based applications. Express is a back-end web application framework of node js, and with the help of express, we can create an API very easily. This tutorial on Express REST API will walk you through all the topics on Express REST API.

How do I use REST API in node JS?

There are several ways to call REST APIs. You can use the fetch web API, which comes by default in all major web browsers. There are node packages like axios and got that let you call a REST API with different HTTP methods. All these ways are pretty simple and easy to use.

What is Express JSON ()?

json() is a built-in middleware function in Express. This method is used to parse the incoming requests with JSON payloads and is based upon the bodyparser. This method returns the middleware that only parses JSON and only looks at the requests where the content-type header matches the type option.

What is RES cookie?

The res. cookie() method is used for setting the cookie name to value. The value parameter can be a string or an object converted to JSON.


1 Answers

A bit late to the party, but that's what Swagger is for.

Swagger-tools is particularly popular for Node.js and I can vouch for it!

like image 149
Nepoxx Avatar answered Sep 29 '22 19:09

Nepoxx