A
A
Artem30942021-01-10 11:37:16
Node.js
Artem3094, 2021-01-10 11:37:16

How can I write data received with a promise to a file?

I am making a request via axios, I need to write the result of the request to a JSON file. How can i do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Shvedov, 2021-01-10
@mmmaaak

The documentation for the fs module has a method to write to a file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question