question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot open normal htmls file with '-s' option

See original GitHub issue

Hi.

I’m using serve to develop and test SPA, so I run it with -s option. However, when I use -s, it seems not to support normal html files.

My directory to open has index.html for SPA and a normal html file for documentation. But when I open the normal html file, it seems to be redirected another path.

Could you check it, please?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
abelosoriocommented, Jun 8, 2018

I agree with @donmccurdy (https://github.com/zeit/serve/issues/401#issuecomment-394890378) that cleanUrls should be false by default, and you should provide a --no-clean-urls (or similar) option for command line.

Also, I couldn’t find any documentation at all about using serve in the command line.

1reaction
denkristoffercommented, Jun 6, 2018

The default config uses cleanUrls for filenames ending in .html. Have you tried disabling it? https://github.com/zeit/serve-handler#cleanurls-booleanarray

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant open local HTML file on chrome - Google Support
I have the same problem. Chrome was opening html files as regular, but now it doesn't work. I wasn't installing any updates.
Read more >
I am not able to open my HTML file in my web browser ... - Quora
Go to that file location, right click on that file >open with> and select the browser of your choice. You can keep it...
Read more >
IE - Cannot open local html file - Microsoft Community
I could not open any locally saved html file. Says, the files are located under "My Documents\news\index.html". However, I cannot open it ...
Read more >
What Is an HTM or HTML File? (And How to Open Them)
An HTM or HTML file is a Hypertext Markup Language file. Any web browser will open and display HTM and HTML files.
Read more >
Can not open HTML file in visual studio 2013 - Stack Overflow
You can click right button and select "Open with" option and after select html-editor. It should help.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found