https://github.com/optimalbits/servion
A file server written in nodejs
https://github.com/optimalbits/servion
Last synced: 3 months ago
JSON representation
A file server written in nodejs
- Host: GitHub
- URL: https://github.com/optimalbits/servion
- Owner: OptimalBits
- License: mit
- Created: 2016-11-22T16:18:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-25T15:48:35.000Z (over 9 years ago)
- Last Synced: 2025-03-25T16:55:31.705Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 9
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# servion
Because handling files in servers is error prone and not DRY. This simple service abstracts file management from
your application.
# Install
```npm install servion```
# Use
```
var servion = require('servion');
servion({
backend: servion.disk({
path: '/my/files/path',
temp: '/my/temp/files'
}),
port: 8080,
});
```
POST FILE:
```
curl --request POST --data-binary "@file.mp4" localhost:8080/my/foo/bar/file.mp4
```
GET FILE:
```
curl localhost:8080/my/foo/bar/file.mp4
```
DELETE FILE:
```
curl -X DELETE localhost:8080/my/foo/bar/file.mp4
```