gimm / gulp-live-server

serve your nodejs/static app live
148 stars 71 forks source link

Index.html in different folder than server #52

Closed tbragaf closed 8 years ago

tbragaf commented 8 years ago

Hi all!

Is it possible to start a server at a specific location, and the index.html be in a different one?

var server = gls.static(`/`, port);
server.start('/dist/index.html'); // Just an idea

In the root folder, I have /dist, /src and /node_modules. index.html is inside /src, which is copied to /dist.

I can't just start the server at /dist, because index.html depends on node_modules.

Thank you, tbragaf

tbragaf commented 8 years ago

Or, in other words, how can I have a different name for index.html? (entry-file?) Imagine my startup page is 'start-page.html'.

With that I could just go with 'dist/index.html'.

gimm commented 8 years ago

you will need a custom server other than the default one

tbragaf commented 8 years ago

@gimm How can I achieve that? I read about having a custom script, but how can I set a different index.html?

genu commented 8 years ago

I really hate it when issues are closed when they're not actually resolved. It just looks bad.