Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
Why is my script src pointing me to localhost:5000?

My Console

Hello lovely developers! I am experiencing a problem with trying to house my javascript file separate from my .ejs files. In this example, I am point my script tag to "../client/index.js" and I know for a fact this is the location of my javascript file. BUT in this case it thinks I am pointing to localhost:5000/client/index.js when it should be pointing to the files in my internal file structure.

I have never experienced an issue like this. The weird thing is when I follow the link is VS code, it takes me to the correct file location. The problem only occurs when the link is present in the browser. I've tried doing some research on correctly orienting script tags, and I cannot for the life of me find out how to get this working.

Thank you so much your time, I appreciate it!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

../ means "Go up one level".

You are using it when you are already at / so there isn't a level to go up.

The ../ is therefore discarded.

It would be a security problem if you could craft a URL that would go above the server root and access any files on the computer running the website.

If you want to access the JS file then you will need to put it somewhere where it has a URL, and then use that URL.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!