Skip to content

Commit

Permalink
Merge pull request #5 from Supernomad/documentation
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
supernomad committed Jul 3, 2015
2 parents 83855f8 + 03cb2dc commit 51e9e8e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,36 @@
[![Build Status](https://travis-ci.org/Supernomad/chunky.svg?branch=master)](https://travis-ci.org/Supernomad/chunky)

[![NPM](https://nodei.co/npm/chunkyjs.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/chunkyjs/)
# chunky
An async upload/download node library leveraging express.js and socket.io. Provides standard, chunked, and udp style transfers.
# chunkyjs
An async upload/download node library leveraging express.js, which provides chunked transfer api's.

What do we mean by a chunked transfer api? Well, what chunkyjs does is provide an api interface that allows downloading or uploading multiple chunks of a file at the same time. This effectively allows you to multi-thread your applications data transfer logic.

chunkyjs also comes with prebuilt nodejs/iojs and web browser clients that can be used to facilitate access to the api in a front-end environment.
### Installation
Installation is the same as any other module.
```
npm install chunkyjs
```
### Usage
Basic usage of chunkyjs is as simple as requiring the module and passing it into the expressjs app's `use` funtion
``` js
var express = require('express'),
app = express(),
chunky = require('chunkyjs');

app.use(chunky.chunked());
app.listen(8080);
```

### Datastore
chunkyjs is currently employing `node-cache` in order to store transfer specific metadata. This is great for development, however means that chunkyjs in its current state cannot be clustered. Support for clustered datastores is on the way.

### Contributing
We welcome contributions, feel free to fork us and make as many PR's as you would like.

A few guide lines:
- You should always rebase your branch on our latest master branch before making a PR.
- We want to maintain a status quo when it comes to the code in chunkyjs. So any PR should satisfy our codacy rules, and maintain the `A` ranking we currently have.
- Again to maintain the status quo all PR's should contain unit-tests that test the additional funcationality and/or bug fix(s).
- Other than that happy coding
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
"body-parser": "~1.13.1",
"multer": "~0.1.8",
"async": "~1.2.1"
},
"peerDependencies": {
"express": "~4.13.0"
}
}

0 comments on commit 51e9e8e

Please sign in to comment.