Skip to content

Commit e74e76e

Browse files
author
Amin Rostami
committed
fix/receive-with-specified-port
1 parent 6aec694 commit e74e76e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bin/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ var debugLog = (log) => {
149149
if (options.receive) {
150150
const app = createDefaultApp();
151151
let uploadAddress = options.ip? `http://${options.ip}:${options.receivePort}/receive`: `http://${getNetworkAddress()}:${options.receivePort}/receive`;
152-
152+
console.log(uploadAddress);
153153
app.use(fileUpload());
154154

155155
const form = fs.readFileSync(`${__dirname}/receive-form.html`);
156156

157-
app.get('/form', (req, res) => {
157+
app.get('/receive', (req, res) => {
158158
res.send(form.toString());
159159
});
160160

@@ -199,7 +199,7 @@ var debugLog = (log) => {
199199
stopPort: 1400
200200
}, (err, port) => {
201201
options.receivePort = port;
202-
uploadAddress = options.ip? `http://${options.ip}:${options.receivePort}/form`: `http://${getNetworkAddress()}:${options.receivePort}/form`;
202+
uploadAddress = options.ip? `http://${options.ip}:${options.receivePort}/receive`: `http://${getNetworkAddress()}:${options.receivePort}/receive`;
203203
app.listen(port, listener);
204204
});
205205
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "easy-sharing",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Sharing is a command-line tool to share directories and files from the CLI to iOS and Android devices without the need of an extra client app",
55
"main": "bin/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)