Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedi4ever/node-fetcher.js
Fetches the nodejs binary from nodejs.org
https://github.com/jedi4ever/node-fetcher.js
Last synced: about 2 months ago
JSON representation
Fetches the nodejs binary from nodejs.org
- Host: GitHub
- URL: https://github.com/jedi4ever/node-fetcher.js
- Owner: jedi4ever
- License: mit
- Created: 2013-08-15T08:42:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-22T18:01:26.000Z (over 11 years ago)
- Last Synced: 2024-11-06T13:07:04.942Z (2 months ago)
- Language: JavaScript
- Size: 92.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
# Description
A simple helper to download the nodejs binary from the `http://nodejs.org/dist`
It will download the tgz and extract the nodejs binary from it
[![Build Status](https://travis-ci.org/jedi4ever/node-fetcher.js.png)](https://travis-ci.org/jedi4ever/node-fetcher.js)
# Usage
var nodeFetcher = require('node-fetcher');
nodeFetcher.download('10.0.3', 'linux', 'x64', '/tmp/node', function(err) {
// do something with the error
});nodeFetcher.download('latest', 'linux', 'x64', '/tmp/node', function(err) {
// do something with the error
});nodeFetcher.download('system', 'linux', 'x64', '/tmp/node', function(err) {
// do something with the error
});# Limits
It currently only supports tgz based downloads. Feel free to add the pkg or exe fetchers# API
## download
nodeFetcher.download(version, platform, arch, filename, callback);downloads the specified version, platform and architecture to filename
- `version` : latest | system | _version_ (X.Y.Z - without or without the v prefix)
- `architecture` : x86 or x64
- `platform` : linux, darwin or sunos
- `filename` : path to save the nodejs binary to
- `callback` : function that will pass the err or not## downloadURL
nodeFetcher.downloadURL(version, platform, arch);returns the downloadURL for the specified version, platform and architecture to filename
- `version` : (without the v prefix)
- `architecture` : x86 or x64
- `platform` : linux, darwin or sunos# License
MIT