Skip to content

Tag: node.js

Node express API not get in response?

I have created a node-express API. And I request using fetch like this In Network tab I got the same JSON object send from server. In console log of resonpse it print below things…. How can I use the JSON data that send from the server? Answer To get the actual data, you need response.json() like this t…

Use promise-returning code without async/await

I’m trying to quickly write a simple tool in NodeJS using pdf-lib. pdf-lib appears to be designed to use promises and async/await, but I don’t want the extra code complexity of async/await for such a simple tool. How can I use functions that return a promise without the extra bother of async/await…