https://github.com/gera2ld/send-dir
Send directory via direct HTTP
https://github.com/gera2ld/send-dir
Last synced: about 2 months ago
JSON representation
Send directory via direct HTTP
- Host: GitHub
- URL: https://github.com/gera2ld/send-dir
- Owner: gera2ld
- Created: 2021-02-03T16:28:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T05:09:28.000Z (over 5 years ago)
- Last Synced: 2026-05-12T00:33:28.737Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# send-dir
Send directory via direct HTTP between different machines.
## Why
This could be useful when sending built code to the development server frequently, especially when we don't have SSH. This tool just works if only we have HTTP.
## Usage
```bash
$ npx send-dir SOURCE_DIR TARGET_DIR
```
And then follow the instructions in output, like running a one-line command in the target machine.
Note that both `SOURCE_DIR` and `TARGET_DIR` can be relative paths, just that `SOURCE_DIR` is relative to the working directory of your source machine and `TARGET_DIR` is relative to that of your target machine.
## Example
Here is a more detailed example.
Say we are at the root of the project, and want to copy `./packages/awesome/lib` to `./node_modules/awesome/lib` in the development machine which does not support SSH server.
Then we just need to run:
```bash
$ npx send-dir packages/awesome/lib node_modules/awesome/lib
```
And we will see output like this:
```bash
Run the following command at your target machine:
curl -fsS http://192.168.31.161:8001/fetch.sh | sh
```
We copy the one-line command and paste it in the development machine, or you may type it if the two machines are isolated physically (sad). Done!