Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fernandospr/simple-file-server
This is a simple NodeJS file server
https://github.com/fernandospr/simple-file-server
Last synced: 20 days ago
JSON representation
This is a simple NodeJS file server
- Host: GitHub
- URL: https://github.com/fernandospr/simple-file-server
- Owner: fernandospr
- Created: 2018-07-14T23:56:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T16:41:45.000Z (over 1 year ago)
- Last Synced: 2024-11-08T10:50:43.293Z (2 months ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple-file-server
This is a simple NodeJS file server that allows to host files.## Quick Setup
* Install NodeJS
* Install packages:
```
$ npm install
```
* Run the app:
```
$ node app.js
```## Usage
### To upload a file
Make a `POST` request to `/files` using `content-type: multipart/form-data` header and a `file` field containing the path to the file you want to upload.#### curl example
```
curl -X POST \
http://localhost:3000/files \
-H 'content-type: multipart/form-data' \
-F file=@/Users/fsproviero/Desktop/my-filename
```### To retrieve a file
Make a `GET` request to `/files/my-filename`