lwsjs / local-web-server

A lean, modular web server for rapid full-stack development.
MIT License
1.21k stars 85 forks source link

Error when trying to configure more than one rewrite #46

Closed atrauzzi closed 8 years ago

atrauzzi commented 8 years ago

Seems like if I have more than one rewrite specified, I'm unable to start the server:

...\node_modules\local-web-server\node_modules\path-to-regexp\index.js:89
  if (index < str.length) {
                 ^

TypeError: Cannot read property 'length' of undefined
{
  "rewrite": [
    { "from:": "/PathOne/*", "to": "http://localhost/PathOne/$1" },
    { "from:": "/PathTwo/*", "to": "http://localhost/PathTwo/$1" },
    { "from": "/PathThree/*", "to": "http://localhost/PathThree/$1" }
  ]
}

Let me know if any other info would help.

atrauzzi commented 8 years ago

K, I have no idea what's going on, maybe some bad characters snuck in? I just rewrote it all and it works. Weird...