# \*\*Live Server\*\* is not opening javascript file automatically

**URL:** <https://forum.codewithmosh.com/t/live-server-is-not-opening-javascript-file-automatically/19782>\
**Category:** JavaScript\
**Created:** [April 22, 2023, 5:19pm UTC](https://forum.codewithmosh.com/t/live-server-is-not-opening-javascript-file-automatically/19782 "2023-04-22T17:19:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junier](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@Junier](https://forum.codewithmosh.com/u/Junier)\
**Post date:** [April 22, 2023, 5:19pm UTC](https://forum.codewithmosh.com/t/live-server-is-not-opening-javascript-file-automatically/19782/1 "2023-04-22T17:19:50Z")

</div>

Hi everybody! I would to know the solution for this issue. Live Server not opening javascript file automatically. Live Server only open the folder where the file is, and this on the URL : [http://127.0.0.1:8080/](http://127.0.0.1:8080/)

And that path is only the path to the folderVisual\_Studio\_Code which the folder that has the file Javascript\_block\_game.js

Normally if it is working you will read [http://127.0.0.1:8080/Javascript\_block\_game.js](http://127.0.0.1:8080/Javascript_block_game.js)  
on the URL Chrome browser path

Is there a way to fix this? I what is the reason this is happening?

Thank you in advance!

Cheers

Junier

Here is a screenshot:  
 ![Live_Server_Issue_1](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/5/51ed889c8c7654b26b78a6c970207acd5cf64e08.jpeg)strong text **strong text**

---

<div class="post-metadata">

**Author:** ![theorion](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/theorion/32/7783_2.png) [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Post date:** [April 22, 2023, 5:43pm UTC](https://forum.codewithmosh.com/t/live-server-is-not-opening-javascript-file-automatically/19782/2 "2023-04-22T17:43:54Z")

</div>

This may not be helpful but from what I know you don’t open live server with JS, you link a html file to the JS file you want to use then open live server to the html file

---

<div class="post-metadata">

**Author:** ![Junier](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@Junier](https://forum.codewithmosh.com/u/Junier)\
**Post date:** [April 22, 2023, 8:21pm UTC](https://forum.codewithmosh.com/t/live-server-is-not-opening-javascript-file-automatically/19782/3 "2023-04-22T20:21:32Z")

</div>

thank you theorion. I found out that about an hour ago. I was not aware of that. Cheers

---

<div class="post-metadata">

**Author:** ![JoelBonetR](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/joelbonetr/32/6003_2.png) [@JoelBonetR](https://forum.codewithmosh.com/u/JoelBonetR)\
**Post date:** [April 28, 2023, 8:10am UTC](https://forum.codewithmosh.com/t/live-server-is-not-opening-javascript-file-automatically/19782/4 "2023-04-28T08:10:31Z")

</div>

Also following the standards and conventions I’d suggest to have an `index.html` file which includes the given javaScript entry point to your App 🙂

Best regards
