Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oieduardorabelo/node-request

Basic app to read a json and downlaod a file, using streams
https://github.com/oieduardorabelo/node-request

Last synced: 10 days ago
JSON representation

Basic app to read a json and downlaod a file, using streams

Awesome Lists containing this project

README

        

# Request and download files

Basic app to download all links in a json file

***Recursiveness***

![Using Recursiveness](http://img-9gag-fun.9cache.com/photo/aG9Qyp5_700b.jpg)

### How it work's

First things first, install dependencies:

```
npm install
```

And now, you can start passing files for the app, like that:

```
node app.js .json
```

### The JSON file

The json file need to have this structure:

```
[{
"url": "http://upload.wikimedia.org/wikipedia/commons/b/ba/Brown_Tree_Frog_2.jpg",
"name": "Awesome frog"
},
{
"url": "http://upload.wikimedia.org/wikipedia/en/7/70/Example.png",
"name": "My Picture"
}]
```
***ps: you can put any kind of media, just need to absolute path***

From the json above, the downloaded files will be:

```
00-Awesome-frog.jpg
01-My-Pricture.png
```