atom-live-server icon indicating copy to clipboard operation
atom-live-server copied to clipboard

Atom Live Server Wont Open Other HTML Files

Open Nerldy opened this issue 7 years ago • 10 comments

Seems like I can only use LS on a index.html file. If I try running it on any other HTML file other than index it doesn't work. It keeps running the index file.

Nerldy avatar Jun 14 '17 15:06 Nerldy

Same here, I can't open a different index.html from a different project will always come back to the old one.

ceciliamarnero avatar Jun 30 '17 18:06 ceciliamarnero

It's actually the same issue i faced. Try not to have a file named "index.html". Have some other unique names, so when u Stop (Ctrl+Alt+Q) & Start(Ctrl+alt+L) the live server again, you would get the folder listed where you can go to the directory and access that particular file live in the local server. (Example : http://127.0.0.1:3000/filename.html )

sowmyy avatar Sep 20 '17 11:09 sowmyy

In my case, I re-ordered my project files and it worked for me. I think it defaults to the first one on the list. "AHA landing page" was at the bottom and I moved it to the top. (See screenshot). I hope this helps!

screen shot 2017-10-16 at 12 01 25 pm

noelmiciano avatar Oct 16 '17 16:10 noelmiciano

@sowmyy Thanks for the comment, I am experiencing the same issue. I am curious though, how long did it take you to figure that out? And what was that process like? I am new to programming and I am amazed at how people find solutions to all kinds of problems and I want to be able to do the same. Thank You.

8Ozymandias avatar Mar 17 '18 03:03 8Ozymandias

atom live server solution to index html default

@sowmyy The solution you provided worked.

1.I gave it a unique name. 2.I then stopped and started the server. 3.I then went to the specific directory and accessed the particular file in the live server.

Thank You.

8Ozymandias avatar Mar 17 '18 03:03 8Ozymandias

When I click on a file my Chrome tries to download the file and not open it... must be a Chrome setting.

Just realized it was a php file that wanted to be downloaded. Does LS only work with htm/html files?

RonR-WebDesign avatar Mar 21 '18 01:03 RonR-WebDesign

@RonR-WebDesign yes

jas-chen avatar Mar 21 '18 07:03 jas-chen

Many thanks,

I have the same issue and I solve it through your suggestion.

rashedki avatar Oct 09 '19 07:10 rashedki

@Nerldy I solved it. After the live port server write /filename.html Eg. If your filename is exercise.html and your live server is http://127.0.0.1:9555 then change it to http://127.0.0.1:9555/exercise.html

qasimsk2012 avatar Jul 02 '21 10:07 qasimsk2012

same issue 😔 server also doesn't run in my case. Instead, install open-in-browser package and run your code on the browser itself

nooberen avatar Feb 05 '22 08:02 nooberen