Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Running on a remote host #43
Comments
OnkelTem
commented
Apr 11, 2012
|
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.
This is valuable idea. |
Adrian-S
commented
May 4, 2012
|
What if my remote host can't run nodejs and/or autosave server ? Is there an alternative ? |
|
Yes, you can mount SSH drive locally. |
Adrian-S
commented
May 5, 2012
|
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 |
OnkelTem commentedApr 11, 2012
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.