# akera-rest-file

> Akera-web REST File component

Latest version **1.0.4** (published 2016-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install akera-rest-file
pnpm add akera-rest-file
yarn add akera-rest-file
bun add akera-rest-file
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2016-04-18 |
| First published | 2016-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Radu Nicoara |
| Maintainers | akeraio |

## Links

- npm: https://www.npmjs.com/package/akera-rest-file
- Repository: https://github.com/akera-io/akera-rest-file
- Homepage: http://akera.io
- Issues: https://github.com/akera-io/akera-rest-file/issues
- npm.io page: https://npm.io/package/akera-rest-file

## Dependencies (1)

- [akera-api](https://npm.io/package/akera-api.md) >=1.0.15

## Recent versions

- 1.0.4 (latest) — 2016-04-18
- 1.0.3 — 2016-02-17
- 1.0.2 — 2016-02-17
- 1.0.1 — 2016-02-17
- 1.0.0 — 2016-02-16

## README

[![Akera Logo](http://akera.io/logo.png)](http://akera.io/)

  REST File module for Akera.io web service - used mainly for developer studio this 
  broker middleware service provides access to files in application server web-path.
  
## Installation

```bash
$ npm install akera-rest-file
```

## Docs

  * [Website and Documentation](http://akera.io/)

## Quick Start

  This module is designed to only be loaded as broker level service which 
  is usually done by adding a reference to it in `services` section of 
  each broker's configuration in `akera-web.json` configuration file.
   
```json
  "brokers": [
  	{	"name": "demo",
  		"host": "localhost",
		"port": 3737,
		"services": [
			{ 
				"middleware": "akera-rest-file",
				"config": {
					"route": "/rest-file/"
				}
			}
		]
	}
  ]
```
  
  Service options available:
	- `route`: the route where the service is going to be mounted (default: '/rest/file/')
  
  The interface can then be used to access/update files on the application server's web-path by making 
  HTTP requests: 

| Method | Url | Function |
| --- | --- | --- |
| GET    | `http://[host]/[broker]/rest-file/path` | reads file or folder content of given path |
| PUT    | `http://[host]/[broker]/rest-file/path` | create a new file at given path, use `isDir` parameter with value or `true` to create a folder |
| POST   | `http://[host]/[broker]/rest-file/path` | update the file content at given path using the request body as new content |
| DELETE | `http://[host]/[broker]/rest-file/path` | delete the file or folder at given path |
 
## License
	
[MIT](https://github.com/akera-io/akera-rest-file/raw/master/LICENSE)

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