Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I can reach my page on localhost when I define a new variable on my app.js file

[enter image description here](https://i.stack.imgur.com/jgD0e.png)

Hi,
When I try to define the variable const items = [];
My localhost refuse to connect. I get ERR_CONNECTION_REFUSED. or (This site can’t be reached).
When I comment out the the line where I’ve declared the variable, the site works.

Does anybody have an idea about why?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

My firewall is off and I disabled all proxies. But nothing.

>Solution :

You didn’t pass the variable to the template
screenshot of the code

You should do this instead:

res.render("list", { dayWeek: day, newListItem: items });
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading