Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cube-root/directory-serve
CLI tool to send and receive file on a network to a server
https://github.com/cube-root/directory-serve
cli directory filesystem nodejs send server static
Last synced: 3 months ago
JSON representation
CLI tool to send and receive file on a network to a server
- Host: GitHub
- URL: https://github.com/cube-root/directory-serve
- Owner: cube-root
- License: mit
- Created: 2022-10-10T17:31:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-27T16:08:16.000Z (about 2 years ago)
- Last Synced: 2024-09-19T18:37:35.075Z (4 months ago)
- Topics: cli, directory, filesystem, nodejs, send, server, static
- Language: JavaScript
- Homepage:
- Size: 740 KB
- Stars: 429
- Watchers: 5
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - cube-root/directory-serve - CLI tool to send and receive file on a network to a server (JavaScript)
README
# Directory Serve
Directory serve is a CLI library for sending and receiving a file from your android and IOS devices.
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):```bash
$ npm install -g directory-serve
```## Help
```bash
npx directory-serve --help
```## Usage
After installing globally
```bash
directory-serve /path-of-directory
```or
Directly use the command
```bash
npx directory-serve /path-of-directory
```or
```bash
npx directory-serve /path-to-file
```## Arguments
| options | default | description | Example |
| :------: | :-------: | :-----------------------------: | :-------------------------------------------------------------------------------------: |
| u | true | Restrict upload file option | `npx directory-serve /path-of-directory -u=false` |
| p | 8989 | Change the port | `npx directory-serve /path-of-directory -p=3000` |
| help | | Help | `npx directory-serve --help ` |
| username | undefined | Client auth username | `npx directory-serve /path-of-directory --username=my_username ` |
| password | undefined | Client auth password (optional) | `npx directory-serve /path-of-directory --username=my_username --password=my_password ` |
| delete | false | To delete file/folder | `npx directory-serve /path-of-directory --delete=true` |
| debug | false | Debug mode | `npx directory-serve /path-of-directory --delete=true --debug=true` |## Examples
```bash
npx directory-serve .
``````bash
npx directory-serve ~/Desktop
``````bash
npx directory-serve ~/Desktop/my_image.png
``````bash
npx directory-serve ~/Desktop -p=3000 --username=test --password=password
```## For Developing
### prerequisite
1. Node (>=12.0)
clone the repo and follow the commands```bash
git clone https://github.com/cube-root/directory-serve.git
``````bash
npm i
``````bash
npm run dev /path-of-directory
```## For Contributing
[Contribution Guide](/docs/CONTRIBUTING.MD)
## Screenshot
### CLI
![screenshot](/docs/screenshots/terminal-screenshot.png?raw=true "Directory serve")
### Client
![screenshot](/docs/screenshots/directory-list.png?raw=true)
![screenshot](/docs/screenshots/browser_with_remove.png?raw=true)### Client Auth
![screenshot](/docs/screenshots/basic-auth.png?raw=true)