couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Ramage <ryan.ram...@gmail.com>
Subject Re: Finding Files with VHost
Date Sat, 30 Mar 2013 23:12:19 GMT
Chris,

This is what erica generates as a default for rewrites:

https://github.com/benoitc/erica/blob/master/priv/templates/webstyle/_ddoc/rewrites.json

the
"from": "/*", "to": "*"


basically is the kitchen sink rewrite that will get all your script/*,
img/* etc working.



On Sat, Mar 30, 2013 at 4:57 PM, Chris Sphinx <chrissphinx@gmail.com> wrote:

> Hey guys, I've got a quick question. I'm using a vhost and _rewrite to
> serve up a webpage and I'm trying to get the page to include a separate
> javascript file.
>
> http://184.75.155.16.xip.io:**5984 <http://184.75.155.16.xip.io:5984>
>
> Script is running fine, but I'm using a rewrite to point it correctly:
>
> [
>     {
>        "from": "",
>        "to": "index.html"
>     },
>     {
>         "from": "hello.js",
>         "to": "script/hello.js"
>     }
> ]
>
> I'm wondering if there is a better way to do this? Or do I need a rewrite
> for every file I'm going to be using on my page? How do I set the src path
> correctly if I'm using vhost and _rewrite?
>
> - Chris
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message