# minicloud-storage

> minicloud Lightweight distributed file storage

Latest version **0.0.11** (published 2016-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install minicloud-storage
pnpm add minicloud-storage
yarn add minicloud-storage
bun add minicloud-storage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2016-01-06 |
| First published | 2015-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.12.0 |
| Dependencies | 23 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | minicloud |
| Keywords | minicloud, distributed, file, storage |

## Links

- npm: https://www.npmjs.com/package/minicloud-storage
- Repository: https://github.com/minicloud/minicloud-storage
- Homepage: https://github.com/minicloud/minicloud-storage#readme
- Issues: https://github.com/minicloud/minicloud-storage/issues
- npm.io page: https://npm.io/package/minicloud-storage

## Dependencies (23)

- [co](https://npm.io/package/co.md) ^4.6.0
- [mz](https://npm.io/package/mz.md) ^2.0.0
- [md5](https://npm.io/package/md5.md) ^2.0.0
- [mime](https://npm.io/package/mime.md) ^1.3.4
- [uuid](https://npm.io/package/uuid.md) ^2.0.1
- [co-fs](https://npm.io/package/co-fs.md) ^1.2.0
- [kcors](https://npm.io/package/kcors.md) ^1.0.1
- [string](https://npm.io/package/string.md) ^3.3.1
- [co-fs-plus](https://npm.io/package/co-fs-plus.md) ^0.3.1
- [koa-logger](https://npm.io/package/koa-logger.md) ^1.3.0
- [koa-router](https://npm.io/package/koa-router.md) ^5.1.2
- [imagemagick](https://npm.io/package/imagemagick.md) ^0.1.3
- [koa-compress](https://npm.io/package/koa-compress.md) ^1.0.8
- [koa-validate](https://npm.io/package/koa-validate.md) ^0.2.11
- [ape-algorithm](https://npm.io/package/ape-algorithm.md) 0.0.8
- [koa-ratelimit](https://npm.io/package/koa-ratelimit.md) ^2.1.0
- [koa-bodyparser](https://npm.io/package/koa-bodyparser.md) ^2.0.1
- [koa-formidable](https://npm.io/package/koa-formidable.md) ^1.0.0
- [minicloud-koa.io](https://npm.io/package/minicloud-koa.io.md) 0.0.5
- [koa-response-time](https://npm.io/package/koa-response-time.md) ^1.0.2
- [random-access-file](https://npm.io/package/random-access-file.md) ^0.3.1
- [content-disposition](https://npm.io/package/content-disposition.md) ^0.5.0
- [koa-resource-router](https://npm.io/package/koa-resource-router.md) ^0.4.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.0.11 (latest) — 2016-01-06
- 0.0.10 — 2015-09-30

## README

[![build status][travis-image]][travis-url]
  [![Test coverage][coveralls-image]][coveralls-url]
  [![devDependency Status](https://david-dm.org/atom/electron/dev-status.svg)](https://david-dm.org/minicloud/minicloud-storage#info=devDependencies)
  

  lightweight distributed file storage module.

  It is a minicloud file storage module.it can be deployed separately.

## Installation

```
$ npm install minicloud-storage co

```

## Create file index.js
```js
require('co').wrap(function*(){
	var app = yield require('minicloud-storage')()
	app.listen(8031)
})()

```
## Run Server
```
$ node index.js 
```
## Test case
```

//get current storage node disk space
//time is current timestamp,can not exceed 24 hours diff with current time.
//signature=md5(session_id+time+safe_code)
curl -X POST http://127.0.0.1:8031/api/v1/status/info \
    --header "Content-Type: application/json" \
    --data "{\"session_id\":\"xxxxx\",\"signature\":\"xxxx\",\"time\":1278927966}" 

//If successful, there will be the following information output
[
  {
    path: '/dev/mapper/VolGroup-lv_home',
    used: 11636604,(unit:kb)
    total: 2060025240(unit:kb) 
	}
]
```
minicloud-storage is supported in all versions of [iojs](https://iojs.org) without any flags.To use minicloud-storage with node, you must be running __node 0.12.0__ or higher for generator and promise support, and must run node(1)
  with the `--harmony-generators` or `--harmony` flag.

## API

[minicloud-storage api](https://minicloud.readme.io/docs) has provided 6 API.

- support hard disk usage statistics

- support large file block upload/simple file upload

- support file content download

- support return thumbnail for an image.include ai,bmp,eps,gif,jpg,jpeg,png,psd,tif,tiff

- support [socket.io](https://socket.io),http api can seamless convert to websocket.[demo>>](https://minicloud.readme.io/docs/how-to-use-websocket)

# License

  MIT

  
[travis-image]: https://img.shields.io/travis/minicloud/minicloud-storage/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/minicloud/minicloud-storage 
[coveralls-image]: https://img.shields.io/coveralls/minicloud/minicloud-storage/master.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/minicloud/minicloud-storage?branch=master

---
_Source: https://npm.io/package/minicloud-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
