https://github.com/fernandospr/simple-file-server
This is a simple NodeJS file server
https://github.com/fernandospr/simple-file-server
Last synced: 5 months 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T16:41:45.000Z (about 2 years ago)
- Last Synced: 2024-12-31T15:54:25.458Z (7 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`