If you need to download a file in NodeJS without using any third party libraries, then you can do the following.
The NodeJS ecosystem comes with a
fs module, this is to denote the FileSystem built in library.
First declare your imports:
Now you can use the
https module to download a file, and write it to a stream using