Routes.js (URL/File Translation)

  1. Then you need a routes.js file. My routes.js file looks like this:
  2. 
      exports.routes = [
        {
          from: new RegExp('^http://localhost/'),
          to: '/var/www/'
        },
        {
          from: new RegExp('^http://kevingustavson.dev/'),
          to: '/var/www/kevingustavson/'
        }
      ];
          
  3. Finally, let's fire it up!
  4. autosave --config ~/.autosave/routes.js

Previous: Node.js and AutoSave Server

Next: Browser Configuration