How to customize polymer serve with default welcome file

75 Views Asked by At

Various webservers allow the configuration of welcome files, so that when an URL points to a directory and the directory contains an index.html file, that file is being served.

Can I configure polymer serve so that it also serves index.html files when a directory URL is requested?

Internally, polymer-cli is based on polyserve, which is based on Express, having middleware abilities that might help. Do I really have to go so deep?

1

There are 1 best solutions below

0
Chris Gunawardena On

Unfortunatly polymer-cli only passes on to express a set of pre defined arguments. see: https://github.com/Polymer/polymer-cli/blob/c5f8db4c3db39fdb90a089739a5c48961210417a/src/commands/serve.ts#L63

But it looks like the ability to add middleware is in the works https://github.com/Polymer/polyserve/issues/250