Closed OnkelTem closed 12 years ago
I didn't find how to attach files, so the patch goes inline:
--- autosave.orig 2012-04-11 22:40:56.000000000 +0400
+++ autosave 2012-04-11 22:28:37.000000000 +0400
@@ -7,6 +7,7 @@ program
.version(autosave.version)
.option('-p, --port [' + autosave.defaultPort + ']', 'set port to listen on', parseInt)
.option('-f, --config <routes.js>', 'set config file', String)
+ .option('-a, --address [' + autosave.defaultAddress + ']', 'set address to bind to', String)
.parse(process.argv);
var routes;
@@ -21,4 +22,4 @@ if (program.config) {
routes = autosave.routes;
}
-autosave.start(routes, program.port || autosave.defaultPort, autosave.defaultAddress);
+autosave.start(routes, program.port || autosave.defaultPort, program.address || autosave.defaultAddress);
The latest version of Autosave Server already has an address option. Although, I haven’t yet published it on npm.
Well, I think to make this less dangerous, we can simply add a kind of allowed hosts directive. Similar to khow xdebug remote debugging works.
This is valuable idea.
What if my remote host can't run nodejs and/or autosave server ? Is there an alternative ?
Yes, you can mount SSH drive locally.
I use windows and host has no SSH, I only got FTP, and I did find software to mount FTP as a drive but that seams extremely slow. I would love a PHP file to act similar as the server and let the the chrome extension connect directly to the website.
There is no PHP version of Autosave Server. It isn’t hard to write one, but I’m not going to maintain both PHP and Node.js versions.
I don’t use Windows, although googling "mount ftp" has led me to http://serverfault.com/questions/6079/how-can-i-mount-an-ftp-to-a-drive-letter-in-windows
I know this is security vulnerability and almost insane, but I want autosave to work on remote hosts too. The quick hack is very simple, just edit node_modules/autosave/bin/autosave:
Now you can run autosave -a
<IP_of_remote_host>
Well, I think to make this less dangerous, we can simply add a kind of allowed hosts directive. Similar to khow xdebug remote debugging works.