Simple Node.js server for chrome-devtools-autosave
Pull request Compare This branch is 23 commits behind NV:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
README.mdown
diff_match_patch.js
index.js
package.json

README.mdown

A server for chrome-devtools-autosave.

Installation

  1. Install Node.js
  2. Open a terminal (Terminal.app on Mac OS X, cmd.exe on Windows)
  3. Run npm install -g autosave

It fails with "Error: EACCES, permission denied". What should I do?

sudo npm install -g autosave

Usage

Run autosave in the terminal. You should see something like "DevTools Autosave is running on http://127.0.0.1:9104".

It doesn’t work on Windows. I’m having 'autosave' is not recognized as an internal or external command

Have you tried turn it it off and on again? Seriously, restart the system.

Configuration

By default, Autosave only accepts URLs that starts with file://. For the other URLs it shows:

Chrome notification: error message

Let’s say you want to edit http://mydomain.local/main.css; the actual file is located in /Volumes/mydomain.local/main.css. To do so, you need to run autosave --config routes.js; routes.js file looks like this:

exports.routes = [
    {
        from: new RegExp('^http://mydomain\.local/'),
        to: '/Volumes/mydomain.local/'
    }
];

Step by step:

  1. Create a routes.js with the above content
  2. Save it in ~/.autosave/routes.js (or any other location, it doesn’t matter)
  3. Run autosave --config ~/.autosave/routes.js