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.

Downloads index.html instead of serving it

See original GitHub issue

Steps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.

http-server ./dist

What did you expect to happen?

I expected to see rendered ./dist/index.html web page in the browser. BUT instead browser opens save file dialog.

If the issue is a feature request, what is the motivation / use case for it?

Tell us about your environment

  • exact http-server version: ^0.12.3
  • Node version: 12.16.3
  • Platform: Windows 10, Chrome 86.0.4240.75 (Official Build) (64-bit)

Other information (related issues, suggestions for a fix, etc):

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Cosy-harkscommented, Aug 11, 2021

I had this issue when I searched localhost:8080

Issue gone when I searched localhost:8080/index.html

1reaction
zm3d3nicommented, Apr 20, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon S3 downloads index.html instead of serving
I've been through the same issue and I have resolved this way. At S3 Bucket, click o index.html checkbox, click con Actions tab,...
Read more >
Amazon S3 downloads index.html instead of serving - iTecNote
The answer is to gzip the CSS and JavaScript files. Yes, you read that right. gzip -9 production.min.css. This will produce production.min.css ...
Read more >
My website downloads the index file instead of opening my ...
My website downloads the index file instead of opening my content. This happens when the .htaccess file for your website contains an invalid...
Read more >
Solved: Chrome downloading file instead of displaying page
The answer is simple: you visited your unfinished site in Chrome before it was configured correctly. Chrome correctly just downloaded your front ...
Read more >
Apache downloading html files instead of serving them, php ...
Your browser doesn't know how to display application/x-httpd-php ; it knows how to display text/html . You need to send the correct mime...
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