Just to clarify my position - I run for profit web apps too, and have absolutely no objection to any developer putting a price on their products or services.
We're quite biased here: many users want this feature, but we don't want to encourage bad practices (as it may be interpreted by some as "ok let's not write proper tests, there's Paw for that").Īnyway, that was to share my point of view as a Paw guy :) A robust API should have unit tests written with mocks and be part of the server code, not a few assertions made in a 3rd party app. And while we will do something somewhat related in the near future, it's a slippery slope.
And we're writing enough code elsewhere to not want to write code in an app.Īs of scripting used for "unit" testing, we have thought about it many time for Paw.
We don't want to add another level of complexity due to the tools we use.
I know from experience as an iOS developer (then Python backend guy) that when working on a given project, our mind is already full of business logic. Because of that, we try to keep actions intuitive and keep scripting as a last resort (JS scripts & extensions are available in Paw too, btw). Opening this file, you will see the following contents: = require ( '.I guess it's a matter of choice, but we see Paw as a visual tool that makes it easy to setup a request (or a set of requests) to iterate quickly when developing an API or discovering a new one. If you open this directory in a text editor or in an IDE (like Visual Studio Code or WebStorm), you will see that the npm command you issued created a file called package. The command above will scaffold the project with some default properties. Then, move into this new directory and use npm to scaffold a new project: npm init -y For starters, open a terminal, move it to the directory where you usually create your projects, and create a new directory there: mkdir express-ads-api Now that you know what you will create and what the prerequisites are, it's time to starting building your application. Also referred to as RESTful web services, RESTful APIs are based on the REpresentational State Transfer (REST) approach, an architectural style that enables developers to manipulate data.įor more information, check the following resources: If you don't know what RESTful APIs are or what this term stands for, take a look at this brief definition and explanation of RESTful APIs:Ī RESTful API is an Application Programming Interface (API) that uses HTTP verbs like GET, PUT, POST, and DELETE to operate data. The resources, in this case, will represent ads (as in products or services being advertised) that users will create, retrieve, update, and delete.
The API that you will build will allow clients (third-party applications) to issue requests to manipulate resources. What You Will BuildĪs mentioned before, in this article, you will start from scratch (i.e., from an empty directory), then you will go through all the steps needed to build a secure RESTful API. If you don't have these, please, follow the instructions over here. Other than that, you will need to have Node.js and NPM installed in your machine. Although it would be ideal to know a bit about Node.js, you will see that the code and the concepts explained in this article are not complex. If you do have previous experience with JavaScript, but you haven't used Node.js, don't worry, you won't have a hard time here. If you have never used JavaScript before (even for frontend development), you might not understand the article well and it might make sense to learn about it first. To follow along with this article, you will need to have prior knowledge around JavaScript.