[dancer-users] Automating loading of index.html

Gurunandan Bhat gbhat at pobox.com
Sun Apr 28 06:56:20 BST 2013


If the index.html is a static file, you will have to serve it from your
public directory and then use the trick described here:
http://modernperlbooks.com/mt/2011/08/serving-a-local-directory-with-plack.html

HTH



On Sun, Apr 28, 2013 at 11:02 AM, Mark Wood-Patrick
<mwoodpatrick at gmail.com>wrote:

> I need to display index.html for any subdirectory where that file exists
> not just the root****
>
> ** **
>
> Mark****
>
> ** **
>
> *From:* dancer-users-bounces at dancer.pm [mailto:
> dancer-users-bounces at dancer.pm] *On Behalf Of *Jonathan Otsuka
> *Sent:* Saturday, April 27, 2013 5:00 PM
> *To:* Perl Dancer users mailing list
> *Subject:* Re: [dancer-users] Automating loading of index.html****
>
> ** **
>
> Couldn't you do this:****
>
> ** **
>
> get '/' => sub { template 'index.html' };
>
> Jonathan Otsuka****
>
>
> On Apr 27, 2013, at 6:56 PM, Mark Wood-Patrick <mwoodpatrick at nvidia.com>
> wrote:****
>
> Is there a way to be able to tell Dancer to load and index.html file
> automatically if it exists so be able to specify:****
>
>  ****
>
>         http://l-sim-27-071:4080/todomvc/architecture-examples/yui****
>
>  ****
>
> rather than****
>
>  ****
>
>
> http://l-sim-27-071:4080/todomvc/architecture-examples/yui/index.html ****
>
>  ****
>
> Mark Wood-Patrick ****
>
>  ****
> ------------------------------
>
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. ****
> ------------------------------
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users****
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130428/0344c220/attachment-0001.htm>


More information about the dancer-users mailing list